comparison 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
comparison
equal deleted inserted replaced
2774:b2727413fae2 2775:5016609663e2
711 } 711 }
712 712
713 713
714 /** 714 /**
715 * Add a text and a line annotation. 715 * Add a text and a line annotation.
716 * @area convenience to determine positions in plot. 716 * @param area convenience to determine positions in plot.
717 */ 717 */
718 public void addStickyAnnotation( 718 public void addStickyAnnotation(
719 StickyAxisAnnotation annotation, 719 StickyAxisAnnotation annotation,
720 XYPlot plot, 720 XYPlot plot,
721 Area area, 721 Area area,
811 } 811 }
812 812
813 // Add the Annotations to renderer. 813 // Add the Annotations to renderer.
814 plot.getRenderer(rendererIndex).addAnnotation(textAnnotation, 814 plot.getRenderer(rendererIndex).addAnnotation(textAnnotation,
815 org.jfree.ui.Layer.FOREGROUND); 815 org.jfree.ui.Layer.FOREGROUND);
816 if (!Float.isNaN(annotation.getHitPoint())) {
817 // New line annotation to hit curve.
818 XYLineAnnotation hitLineAnnotation = new XYLineAnnotation(area.atLeft(),
819 annotation.getPos(), annotation.getHitPoint(), annotation.getPos());
820 plot.getRenderer(rendererIndex).addAnnotation(hitLineAnnotation,
821 org.jfree.ui.Layer.BACKGROUND);
822 }
816 plot.getRenderer(rendererIndex).addAnnotation(lineAnnotation, 823 plot.getRenderer(rendererIndex).addAnnotation(lineAnnotation,
817 org.jfree.ui.Layer.FOREGROUND); 824 org.jfree.ui.Layer.FOREGROUND);
818 } 825 }
819 826
820 827
824 */ 831 */
825 public void addAnnotationsToRenderer(XYPlot plot) { 832 public void addAnnotationsToRenderer(XYPlot plot) {
826 logger.debug("XYChartGenerator.addAnnotationsToRenderer"); 833 logger.debug("XYChartGenerator.addAnnotationsToRenderer");
827 834
828 if (annotations == null) { 835 if (annotations == null) {
829 logger.debug("XYChartGenerator.addBoxAnnotations: no annotations."); 836 logger.debug("XYChartGenerator.addAnnotationsToRenderer: no annotations.");
830 return; 837 return;
831 } 838 }
832 839
833 // Paints for the boxes/lines. 840 // Paints for the boxes/lines.
834 Stroke basicStroke = new BasicStroke(1.0f); 841 Stroke basicStroke = new BasicStroke(1.0f);

http://dive4elements.wald.intevation.org