Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 3212:abc2db630815
Work in generalized annotations for chart generators
flys-artifacts/trunk@4835 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Fri, 29 Jun 2012 12:35:06 +0000 |
parents | bbb488b145ce |
children | ed07dd55f487 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Thu Jun 28 16:20:33 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Fri Jun 29 12:35:06 2012 +0000 @@ -188,9 +188,6 @@ /** The logger that is used in this generator. */ private static Logger logger = Logger.getLogger(XYChartGenerator.class); - /** List of annotations to insert in plot. */ - protected List<FLYSAnnotation> annotations; - protected List<Marker> domainMarkers = new ArrayList<Marker>(); protected List<Marker> valueMarkers = new ArrayList<Marker>(); @@ -459,18 +456,6 @@ /** - * Adds annotations to list (if visible is true). - */ - public void addVisibleAnnotations(FLYSAnnotation annotation) { - if (annotations == null) { - annotations = new ArrayList<FLYSAnnotation>(); - } - - annotations.add(annotation); - } - - - /** * If no data is visible, draw at least empty axis. */ private void recoverEmptyPlot(XYPlot plot) { @@ -1008,10 +993,10 @@ * in the annotations field. */ public void addAnnotationsToRenderer(XYPlot plot) { - logger.debug("XYChartGenerator.addAnnotationsToRenderer"); + logger.debug("addAnnotationsToRenderer"); if (annotations == null) { - logger.debug("XYChartGenerator.addAnnotationsToRenderer: no annotations."); + logger.debug("addAnnotationsToRenderer: no annotations."); return; } @@ -1083,7 +1068,7 @@ zone.getTo(), area.atTop(), basicStroke, fillPaint, tranPaint); XYTextAnnotation tex = new XYTextAnnotation(zone.getName(), - zone.getFrom() + (zone.getTo() - zone.getFrom()) / 2.0d, + zone.getFrom() + (zone.getTo() - zone.getFrom()) / 1.0d, area.ofGround(0.015f)); if (textStyle != null) { textStyle.apply(tex); @@ -1207,7 +1192,7 @@ } if (visible) { - addVisibleAnnotations(annotations); + addAnnotations(annotations); } }