changeset 2750:97cb098dbf7a

Handle relative points in duration curve diagram. flys-artifacts/trunk@4485 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 23 May 2012 20:45:10 +0000
parents 5eb3edb4f37b
children e50cc06c6c4c
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java
diffstat 2 files changed, 27 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed May 23 20:42:29 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed May 23 20:45:10 2012 +0000
@@ -1,3 +1,8 @@
+2012-05-23	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java:
+	  Handle relative points in doOut.
+
 2012-05-23	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* doc/conf/meta-data.xml: Serve fixations with relative points
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java	Wed May 23 20:42:29 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java	Wed May 23 20:45:10 2012 +0000
@@ -1,6 +1,7 @@
 package de.intevation.flys.exports;
 
 import java.awt.Font;
+import java.awt.geom.Point2D;
 
 import org.w3c.dom.Document;
 
@@ -216,6 +217,12 @@
                 attr,
                 visible);
         }
+        else if (name.equals(RELATIVE_POINT)) {
+            doPointOut((Point2D) artifactFacet.getData(context),
+                artifactFacet,
+                attr,
+                visible);
+        }
         else if (FacetTypes.IS.MANUALPOINTS(name)) {
             doPoints(
                 artifactFacet.getData(context),
@@ -256,6 +263,21 @@
         addAxisSeries(series, YAXIS.W.idx, visible);
     }
 
+    protected void doPointOut(
+        Point2D point,
+        ArtifactAndFacet aandf,
+        Document theme,
+        boolean visible
+    ){
+        logger.debug("DurationCurveGenerator.doPointOut");
+
+        XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
+
+        series.add(point.getX(), point.getY());
+
+        addAxisSeries(series, YAXIS.W.idx, visible);
+    }
+
 
     /**
      * Creates the series for a duration curve's Q facet.

http://dive4elements.wald.intevation.org