[Dive4elements-commits] [PATCH] Removed doExtreme*() as its implemented in own generator now, opened visibility of field artifact for refac

Wald Commits scm-commit at wald.intevation.org
Thu Nov 1 12:19:22 CET 2012


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1351768373 -3600
# Node ID 603233b5a719138ae5f580b75efae9ff1f5bed4d
# Parent  8eabbc5198e1c1543da28b5d3796bed32e56389e
Removed doExtreme*() as its implemented in own generator now, opened visibility of field artifact for refac.

diff -r 8eabbc5198e1 -r 603233b5a719 flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java	Thu Nov 01 12:10:31 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java	Thu Nov 01 12:12:53 2012 +0100
@@ -96,7 +96,7 @@
 
 
     /** Needed to access data to create subtitle. */
-    private FLYSArtifact artifact;
+    protected FLYSArtifact artifact;
 
 
     @Override
@@ -151,9 +151,6 @@
                     aaf,
                     doc, visible, YAXIS.W.idx);
         }
-        else if (name.equals(EXTREME_WQ_CURVE)) {
-            doExtremeCurveOut(aaf, doc, visible);
-        }
         else {
             logger.warn("Unknown facet name " + name);
             return;
@@ -241,41 +238,6 @@
     }
 
 
-    /** Do Extreme Curve out */
-    // TODO Refactor, donate own Generator.
-    protected void doExtremeCurveOut(ArtifactAndFacet aaf, Document doc, boolean visible) {
-        logger.debug("doExtremeCurveOut");
-        ExtremeCurveFacet facet = (ExtremeCurveFacet) aaf.getFacet();
-        Curve curve = (Curve) facet.getData(aaf.getArtifact(), context);
-        if (curve == null) {
-            logger.warn("doExtremeCurveOut: Facet does not contain Curve");
-            return;
-        }
-
-        double maxQ = curve.getSuggestedMaxQ();
-        if (maxQ == Double.MAX_VALUE) {
-            maxQ = 8000;
-        }
-
-        StyledXYSeries series = JFreeUtil.sampleFunction2D(
-                curve,
-                doc,
-                aaf.getFacetDescription(),
-                500,   // number of samples
-                0.0 ,  // start
-                maxQ); // end
-
-        // Add marker from where on its extrapolated.
-        double[] qs = curve.getQs();
-        double extrapolateFrom = qs[qs.length-1];
-
-        Marker m = new ValueMarker(extrapolateFrom);
-        m.setPaint(Color.black);
-        addDomainMarker(m);
-
-        addAxisSeries(series, 0, visible);
-    }
-
     protected void doWQCurveOut(ArtifactAndFacet aaf, Document doc, boolean visible) {
         logger.debug("doWQCurveOut");
 


More information about the Dive4elements-commits mailing list