Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/jfree/FLYSAnnotation.java @ 2138:59bb5c895be3
Improved HYK/Zones- handling.
flys-artifacts/trunk@3716 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 19 Jan 2012 11:00:27 +0000 |
parents | eb35570df0e8 |
children | 2336927cb096 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/FLYSAnnotation.java Thu Jan 19 10:51:20 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/FLYSAnnotation.java Thu Jan 19 11:00:27 2012 +0000 @@ -1,26 +1,48 @@ package de.intevation.flys.jfree; +import java.util.Collections; import java.util.List; import org.w3c.dom.Document; import org.jfree.chart.annotations.XYTextAnnotation; +import de.intevation.flys.artifacts.model.HYKFactory; + + /** - * List of Annotations with name and theme. + * List of Text- Annotations with name and theme. */ public class FLYSAnnotation { - protected List<XYTextAnnotation> annotations; + protected List<XYTextAnnotation> textAnnotations; + + protected List<HYKFactory.Zone> boxes; protected Document theme; protected String label; + /** Create annotations, parameter might be null. */ + public FLYSAnnotation(String label, List<XYTextAnnotation> annotations, + List<HYKFactory.Zone> bAnnotations + ) { + this.label = label; + this.textAnnotations = (annotations != null) + ? annotations + : Collections.<XYTextAnnotation>emptyList(); + this.boxes = (bAnnotations != null) + ? bAnnotations + : Collections.<HYKFactory.Zone>emptyList(); + } + public FLYSAnnotation(String label, List<XYTextAnnotation> annotations) { - this.label = label; - this.annotations = annotations; + this.label = label; + this.textAnnotations = (annotations != null) + ? annotations + : Collections.<XYTextAnnotation>emptyList(); + this.boxes = Collections.<HYKFactory.Zone>emptyList(); } public void setLabel(String label) { @@ -31,8 +53,12 @@ return label; } - public List<XYTextAnnotation> getAnnotations() { - return annotations; + public List<XYTextAnnotation> getTextAnnotations() { + return textAnnotations; + } + + public List<HYKFactory.Zone> getBoxes() { + return boxes; } public void setTheme(Document theme) {