changeset 6466:cf514239d290

Removed indentation and added doc for prepare*Data.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 27 Jun 2013 10:42:57 +0200
parents 126c76184c3e
children 0f997d6397c6
files artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java
diffstat 1 files changed, 16 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java	Thu Jun 27 10:41:36 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java	Thu Jun 27 10:42:57 2013 +0200
@@ -21,6 +21,7 @@
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.DateRange;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.extreme.Curve;
@@ -31,6 +32,7 @@
 import org.dive4elements.river.jfree.JFreeUtil;
 import org.dive4elements.river.jfree.StyledXYSeries;
 
+import org.dive4elements.river.utils.RiverUtils;
 import org.dive4elements.river.utils.ThemeUtil;
 
 
@@ -71,21 +73,23 @@
             "W [NN + m]";
 
 
+    /** First, ask parent to add data, then handle extreme_wq_curve(_base) data.*/
     @Override
     public boolean prepareChartData(ArtifactAndFacet aaf, Document theme, boolean visible) {
-        if (!super.prepareChartData(aaf, theme, visible)) {
-            String name = aaf.getFacetName();
-            if (name.equals(EXTREME_WQ_CURVE)) {
-                doExtremeCurveOut(aaf, theme, visible);
-                return true;
-            }
-            else if (name.equals(EXTREME_WQ_CURVE_BASE)) {
-                doExtremeCurveBaseOut(aaf, theme, visible);
-                return true;
-            }
-            return false;
+        if (super.prepareChartData(aaf, theme, visible)) {
+            return true;
         }
-        return true;
+
+        String name = aaf.getFacetName();
+        if (name.equals(EXTREME_WQ_CURVE)) {
+            doExtremeCurveOut(aaf, theme, visible);
+            return true;
+        }
+        else if (name.equals(EXTREME_WQ_CURVE_BASE)) {
+            doExtremeCurveBaseOut(aaf, theme, visible);
+            return true;
+        }
+        return false;
     }
 
     /** Do Extreme Curve nonextrapolated points out. */

http://dive4elements.wald.intevation.org