diff flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.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 12440c6b8b66
children ed07dd55f487
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java	Thu Jun 28 16:20:33 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java	Fri Jun 29 12:35:06 2012 +0000
@@ -55,6 +55,7 @@
 import de.intevation.flys.jfree.Bounds;
 import de.intevation.flys.jfree.DoubleBounds;
 import de.intevation.flys.jfree.EnhancedLineAndShapeRenderer;
+import de.intevation.flys.jfree.FLYSAnnotation;
 import de.intevation.flys.jfree.StableXYDifferenceRenderer;
 import de.intevation.flys.jfree.StyledAreaSeriesCollection;
 import de.intevation.flys.jfree.Style;
@@ -113,7 +114,8 @@
     /** Map of datasets ("index"). */
     protected SortedMap<Integer, AxisDataset> datasets;
 
-
+    /** List of annotations to insert in plot. */
+    protected List<FLYSAnnotation> annotations;
 
     /**
      * A mini interface that allows to walk over the YAXIS enums defined in
@@ -158,6 +160,17 @@
     }
 
 
+    /**
+     * Adds annotations to list. The given annotation will be visible.
+     */
+    public void addAnnotations(FLYSAnnotation annotation) {
+        if (annotations == null) {
+            annotations = new ArrayList<FLYSAnnotation>();
+        }
+
+        annotations.add(annotation);
+    }
+
 
     /**
      * This method needs to be implemented by concrete subclasses to create new

http://dive4elements.wald.intevation.org