annotate flys-artifacts/src/main/java/de/intevation/flys/jfree/FLYSAnnotation.java @ 2152:2336927cb096

Add basic (text) styling for HYKS. flys-artifacts/trunk@3734 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 20 Jan 2012 08:38:50 +0000
parents 59bb5c895be3
children c68f4f227c09
rev   line source
1677
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.jfree;
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
2138
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
3 import java.util.Collections;
1677
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import java.util.List;
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
1679
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
6 import org.w3c.dom.Document;
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
7
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
8 import org.jfree.chart.annotations.XYTextAnnotation;
1677
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9
2138
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
10 import de.intevation.flys.artifacts.model.HYKFactory;
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
11
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
12
1721
eb35570df0e8 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1712
diff changeset
13 /**
2138
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
14 * List of Text- Annotations with name and theme.
1721
eb35570df0e8 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1712
diff changeset
15 */
1677
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 public class FLYSAnnotation {
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17
2138
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
18 protected List<XYTextAnnotation> textAnnotations;
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
19
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
20 protected List<HYKFactory.Zone> boxes;
1679
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
21
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
22 protected Document theme;
1677
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 protected String label;
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26
2152
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
27 public FLYSAnnotation(String label, List<XYTextAnnotation> annotations) {
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
28 this(label, annotations, null, null);
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
29 }
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
30
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
31
2138
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
32 /** Create annotations, parameter might be null. */
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
33 public FLYSAnnotation(String label, List<XYTextAnnotation> annotations,
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
34 List<HYKFactory.Zone> bAnnotations
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
35 ) {
2152
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
36 this(label, annotations, bAnnotations, null);
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
37 }
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
38
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
39
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
40 /** Create annotations, parameter might be null. */
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
41 public FLYSAnnotation(String label, List<XYTextAnnotation> annotations,
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
42 List<HYKFactory.Zone> bAnnotations, Document theme
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
43 ) {
2138
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
44 this.label = label;
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
45 this.textAnnotations = (annotations != null)
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
46 ? annotations
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
47 : Collections.<XYTextAnnotation>emptyList();
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
48 this.boxes = (bAnnotations != null)
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
49 ? bAnnotations
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
50 : Collections.<HYKFactory.Zone>emptyList();
2152
2336927cb096 Add basic (text) styling for HYKS.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2138
diff changeset
51 this.setTheme(theme);
2138
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
52 }
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
53
1677
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54
1712
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1679
diff changeset
55 public void setLabel(String label) {
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1679
diff changeset
56 this.label = label;
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1679
diff changeset
57 }
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1679
diff changeset
58
1677
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 public String getLabel() {
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 return label;
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 }
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62
2138
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
63 public List<XYTextAnnotation> getTextAnnotations() {
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
64 return textAnnotations;
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
65 }
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
66
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
67 public List<HYKFactory.Zone> getBoxes() {
59bb5c895be3 Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1721
diff changeset
68 return boxes;
1677
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69 }
1679
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
70
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
71 public void setTheme(Document theme) {
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
72 this.theme = theme;
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
73 }
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
74
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
75 public Document getTheme() {
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
76 return theme;
69929c471646 Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1677
diff changeset
77 }
1677
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 }
dd9dfe1e48fa Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org