changeset 4346:603233b5a719

Removed doExtreme*() as its implemented in own generator now, opened visibility of field artifact for refac.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 01 Nov 2012 12:12:53 +0100
parents 8eabbc5198e1
children 97c18bd12dfb
files flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java
diffstat 1 files changed, 1 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- 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");
 

http://dive4elements.wald.intevation.org