comparison 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
comparison
equal deleted inserted replaced
2137:04b6b6a4564d 2138:59bb5c895be3
1 package de.intevation.flys.jfree; 1 package de.intevation.flys.jfree;
2 2
3 import java.util.Collections;
3 import java.util.List; 4 import java.util.List;
4 5
5 import org.w3c.dom.Document; 6 import org.w3c.dom.Document;
6 7
7 import org.jfree.chart.annotations.XYTextAnnotation; 8 import org.jfree.chart.annotations.XYTextAnnotation;
8 9
10 import de.intevation.flys.artifacts.model.HYKFactory;
11
12
9 /** 13 /**
10 * List of Annotations with name and theme. 14 * List of Text- Annotations with name and theme.
11 */ 15 */
12 public class FLYSAnnotation { 16 public class FLYSAnnotation {
13 17
14 protected List<XYTextAnnotation> annotations; 18 protected List<XYTextAnnotation> textAnnotations;
19
20 protected List<HYKFactory.Zone> boxes;
15 21
16 protected Document theme; 22 protected Document theme;
17 23
18 protected String label; 24 protected String label;
19 25
20 26
27 /** Create annotations, parameter might be null. */
28 public FLYSAnnotation(String label, List<XYTextAnnotation> annotations,
29 List<HYKFactory.Zone> bAnnotations
30 ) {
31 this.label = label;
32 this.textAnnotations = (annotations != null)
33 ? annotations
34 : Collections.<XYTextAnnotation>emptyList();
35 this.boxes = (bAnnotations != null)
36 ? bAnnotations
37 : Collections.<HYKFactory.Zone>emptyList();
38 }
39
21 public FLYSAnnotation(String label, List<XYTextAnnotation> annotations) { 40 public FLYSAnnotation(String label, List<XYTextAnnotation> annotations) {
22 this.label = label; 41 this.label = label;
23 this.annotations = annotations; 42 this.textAnnotations = (annotations != null)
43 ? annotations
44 : Collections.<XYTextAnnotation>emptyList();
45 this.boxes = Collections.<HYKFactory.Zone>emptyList();
24 } 46 }
25 47
26 public void setLabel(String label) { 48 public void setLabel(String label) {
27 this.label = label; 49 this.label = label;
28 } 50 }
29 51
30 public String getLabel() { 52 public String getLabel() {
31 return label; 53 return label;
32 } 54 }
33 55
34 public List<XYTextAnnotation> getAnnotations() { 56 public List<XYTextAnnotation> getTextAnnotations() {
35 return annotations; 57 return textAnnotations;
58 }
59
60 public List<HYKFactory.Zone> getBoxes() {
61 return boxes;
36 } 62 }
37 63
38 public void setTheme(Document theme) { 64 public void setTheme(Document theme) {
39 this.theme = theme; 65 this.theme = theme;
40 } 66 }

http://dive4elements.wald.intevation.org