# HG changeset patch # User Felix Wolfsteller # Date 1337805910 0 # Node ID 97cb098dbf7a6b3eefcf4a09c6e612b77f4bbd0b # Parent 5eb3edb4f37bd5f70d33bfab8a84fb74757da328 Handle relative points in duration curve diagram. flys-artifacts/trunk@4485 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 5eb3edb4f37b -r 97cb098dbf7a flys-artifacts/ChangeLog --- 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 + + * src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java: + Handle relative points in doOut. + 2012-05-23 Felix Wolfsteller * doc/conf/meta-data.xml: Serve fixations with relative points diff -r 5eb3edb4f37b -r 97cb098dbf7a flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java --- 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.