Mercurial > dive4elements > river
changeset 1850:0463e1f80bfd
Handle MainValue Facets in Duration Curve Diagrams.
flys-artifacts/trunk@3194 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 09 Nov 2011 13:13:01 +0000 (2011-11-09) |
parents | 5d5dd44d613e |
children | 67aa74efc024 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java |
diffstat | 3 files changed, 28 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Nov 09 13:06:08 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Nov 09 13:13:01 2011 +0000 @@ -1,3 +1,13 @@ +2011-11-09 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Handle MainValue Facets in Duration Curve Diagrams. + + * src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java: + Handle MainValues. + + * src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java: + Adjusted to call doAnnotations. + 2011-11-09 Felix Wolfsteller <felix.wolfsteller@intevation.de> Move do*Annotation* (like mainvalue) in XYChartGenerator.
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java Wed Nov 09 13:06:08 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java Wed Nov 09 13:13:01 2011 +0000 @@ -16,6 +16,8 @@ import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.WQKms; +import de.intevation.flys.jfree.FLYSAnnotation; + /** * An OutGenerator that generates discharge curves. @@ -100,13 +102,11 @@ doQOut((WQKms) f.getData(artifact, context), facet, attr, visible); } else if (name.equals(COMPUTED_DISCHARGE_MAINVALUES_Q) - || name.equals(MAINVALUES_Q)) { - doMainValueQAnnotations( - f.getData(artifact, context), facet, attr, visible); - } - else if (name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) - || name.equals(MAINVALUES_W)) { - doMainValueWAnnotations( + || name.equals(MAINVALUES_Q) + || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) + || name.equals(MAINVALUES_W) + ) { + doAnnotations((FLYSAnnotation) f.getData(artifact, context), facet, attr, visible); } else {
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java Wed Nov 09 13:06:08 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java Wed Nov 09 13:13:01 2011 +0000 @@ -21,6 +21,8 @@ import de.intevation.flys.artifacts.model.WQDay; import de.intevation.flys.artifacts.resources.Resources; +import de.intevation.flys.jfree.FLYSAnnotation; + /** * An OutGenerator that generates duration curves. @@ -145,6 +147,15 @@ else if (name.equals(DURATION_Q)) { doQOut((WQDay) f.getData(artifact, context), attr, visible); } + else if (name.equals(COMPUTED_DISCHARGE_MAINVALUES_Q) + || name.equals(MAINVALUES_Q) + || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) + || name.equals(MAINVALUES_W) + ) { + doAnnotations( + (FLYSAnnotation) f.getData(artifact, context), + facet, attr, visible); + } else { logger.warn("Unknown facet name: " + name); return;