comparison artifacts/src/main/java/org/dive4elements/river/jfree/RiverAnnotation.java @ 6905:1b35b2ddfc28

Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 22 Aug 2013 23:31:38 +0200
parents af13ceeba52a
children 5e38e2924c07
comparison
equal deleted inserted replaced
6904:d710bd3df387 6905:1b35b2ddfc28
7 */ 7 */
8 8
9 package org.dive4elements.river.jfree; 9 package org.dive4elements.river.jfree;
10 10
11 import org.dive4elements.river.artifacts.model.HYKFactory; 11 import org.dive4elements.river.artifacts.model.HYKFactory;
12 import org.dive4elements.river.themes.ThemeDocument;
12 13
13 import java.util.Collections; 14 import java.util.Collections;
14 import java.util.List; 15 import java.util.List;
15 16
16 import org.jfree.chart.annotations.XYTextAnnotation; 17 import org.jfree.chart.annotations.XYTextAnnotation;
17 import org.w3c.dom.Document;
18 18
19 /** 19 /**
20 * List of Text- Annotations (Sticky to one axis or in space) 20 * List of Text- Annotations (Sticky to one axis or in space)
21 * and 'HYK'-Annotations (rectangles/areas) with name and theme. 21 * and 'HYK'-Annotations (rectangles/areas) with name and theme.
22 */ 22 */
30 30
31 /** Areas at axis. */ 31 /** Areas at axis. */
32 protected List<HYKFactory.Zone> boxes; 32 protected List<HYKFactory.Zone> boxes;
33 33
34 /** Styling information. */ 34 /** Styling information. */
35 protected Document theme; 35 protected ThemeDocument theme;
36 36
37 /** Chart-legend information. */ 37 /** Chart-legend information. */
38 protected String label; 38 protected String label;
39 39
40 40
51 } 51 }
52 52
53 53
54 /** Create annotations, parameter might be null. */ 54 /** Create annotations, parameter might be null. */
55 public RiverAnnotation(String label, List<StickyAxisAnnotation> annotations, 55 public RiverAnnotation(String label, List<StickyAxisAnnotation> annotations,
56 List<HYKFactory.Zone> bAnnotations, Document theme 56 List<HYKFactory.Zone> bAnnotations, ThemeDocument theme
57 ) { 57 ) {
58 this.label = label; 58 this.label = label;
59 this.axisTextAnnotations = (annotations != null) 59 this.axisTextAnnotations = (annotations != null)
60 ? annotations 60 ? annotations
61 : Collections.<StickyAxisAnnotation>emptyList(); 61 : Collections.<StickyAxisAnnotation>emptyList();
90 90
91 public List<HYKFactory.Zone> getBoxes() { 91 public List<HYKFactory.Zone> getBoxes() {
92 return boxes; 92 return boxes;
93 } 93 }
94 94
95 public void setTheme(Document theme) { 95 public void setTheme(ThemeDocument theme) {
96 this.theme = theme; 96 this.theme = theme;
97 } 97 }
98 98
99 public Document getTheme() { 99 public ThemeDocument getTheme() {
100 return theme; 100 return theme;
101 } 101 }
102 102
103 /** 103 /**
104 * Set sticky axis of all axisTextAnnotations 104 * Set sticky axis of all axisTextAnnotations

http://dive4elements.wald.intevation.org