Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 2775:5016609663e2
Draw line from w-annotation to duration curve, rough version.
flys-artifacts/trunk@4514 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 25 May 2012 09:13:43 +0000 |
parents | 5e8e42a36a90 |
children | 5543492f2da4 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Fri May 25 09:05:07 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Fri May 25 09:13:43 2012 +0000 @@ -713,7 +713,7 @@ /** * Add a text and a line annotation. - * @area convenience to determine positions in plot. + * @param area convenience to determine positions in plot. */ public void addStickyAnnotation( StickyAxisAnnotation annotation, @@ -813,6 +813,13 @@ // Add the Annotations to renderer. plot.getRenderer(rendererIndex).addAnnotation(textAnnotation, org.jfree.ui.Layer.FOREGROUND); + if (!Float.isNaN(annotation.getHitPoint())) { + // New line annotation to hit curve. + XYLineAnnotation hitLineAnnotation = new XYLineAnnotation(area.atLeft(), + annotation.getPos(), annotation.getHitPoint(), annotation.getPos()); + plot.getRenderer(rendererIndex).addAnnotation(hitLineAnnotation, + org.jfree.ui.Layer.BACKGROUND); + } plot.getRenderer(rendererIndex).addAnnotation(lineAnnotation, org.jfree.ui.Layer.FOREGROUND); } @@ -826,7 +833,7 @@ logger.debug("XYChartGenerator.addAnnotationsToRenderer"); if (annotations == null) { - logger.debug("XYChartGenerator.addBoxAnnotations: no annotations."); + logger.debug("XYChartGenerator.addAnnotationsToRenderer: no annotations."); return; }