diff flys-artifacts/src/main/java/de/intevation/flys/jfree/FLYSAnnotation.java @ 2161:c68f4f227c09

Somewhat unified Annotation handling, use jfreechart-house-toolkit instead of custom StickyAxisAnnotation. flys-artifacts/trunk@3747 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 23 Jan 2012 10:44:34 +0000
parents 2336927cb096
children a79d5cd26083
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/FLYSAnnotation.java	Mon Jan 23 07:55:17 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/FLYSAnnotation.java	Mon Jan 23 10:44:34 2012 +0000
@@ -7,6 +7,8 @@
 
 import org.jfree.chart.annotations.XYTextAnnotation;
 
+import de.intevation.flys.jfree.StickyAxisAnnotation;
+
 import de.intevation.flys.artifacts.model.HYKFactory;
 
 
@@ -15,8 +17,11 @@
  */
 public class FLYSAnnotation {
 
+    // TODO this will likely be used, soon.
     protected List<XYTextAnnotation> textAnnotations;
 
+    protected List<StickyAxisAnnotation> axisTextAnnotations;
+
     protected List<HYKFactory.Zone> boxes;
 
     protected Document theme;
@@ -24,13 +29,13 @@
     protected String label;
 
 
-    public FLYSAnnotation(String label, List<XYTextAnnotation> annotations) {
+    public FLYSAnnotation(String label, List<StickyAxisAnnotation> annotations) {
         this(label, annotations, null, null);
     }
 
 
     /** Create annotations, parameter might be null. */
-    public FLYSAnnotation(String label, List<XYTextAnnotation> annotations,
+    public FLYSAnnotation(String label, List<StickyAxisAnnotation> annotations,
         List<HYKFactory.Zone> bAnnotations
     ) {
         this(label, annotations, bAnnotations, null);
@@ -38,16 +43,17 @@
 
 
     /** Create annotations, parameter might be null. */
-    public FLYSAnnotation(String label, List<XYTextAnnotation> annotations,
+    public FLYSAnnotation(String label, List<StickyAxisAnnotation> annotations,
         List<HYKFactory.Zone> bAnnotations, Document theme
     ) {
         this.label           = label;
-        this.textAnnotations = (annotations != null)
+        this.axisTextAnnotations = (annotations != null)
                                ? annotations
-                               : Collections.<XYTextAnnotation>emptyList();
+                               : Collections.<StickyAxisAnnotation>emptyList();
         this.boxes  = (bAnnotations != null)
                                ? bAnnotations
                                : Collections.<HYKFactory.Zone>emptyList();
+        this.textAnnotations = Collections.<XYTextAnnotation>emptyList();
         this.setTheme(theme);
     }
 
@@ -60,6 +66,10 @@
         return label;
     }
 
+    public List<StickyAxisAnnotation> getAxisTextAnnotations() {
+        return axisTextAnnotations;
+    }
+
     public List<XYTextAnnotation> getTextAnnotations() {
         return textAnnotations;
     }

http://dive4elements.wald.intevation.org