Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/exports/AxisSection.java @ 1993:85132c9edd64
Make reuse of the old CollectionAttribute during the describe() operation of FLYSArtifactCollection - remove the old facets only.
flys-artifacts/trunk@3430 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 16 Dec 2011 09:19:11 +0000 |
parents | e1c9f28e2675 |
children | c4e0e433f825 |
rev | line source |
---|---|
1986
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.exports; |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import org.w3c.dom.Document; |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import org.w3c.dom.Element; |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import org.w3c.dom.Node; |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.artifactdatabase.state.Attribute; |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.artifactdatabase.state.DefaultSection; |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 /** |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 */ |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 public class AxisSection extends DefaultSection { |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
1991
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
17 public static final String IDENTIFIER_ATTR = "id"; |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
18 public static final String LABEL_ATTR = "label"; |
1992
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
19 public static final String FONTSIZE_ATTR = "font-size"; |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
20 public static final String FIXATION_ATTR = "fixation"; |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
21 public static final String UPPERRANGE_ATTR = "upper"; |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
22 public static final String LOWERRANGE_ATTR = "lower"; |
1991
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
23 |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
24 |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
25 public AxisSection() { |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
26 super("axis"); |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
27 } |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
28 |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
29 |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
30 public void setIdentifier(String identifier) { |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
31 if (identifier == null || identifier.length() == 0) { |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
32 return; |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
33 } |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
34 |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
35 Attribute attr = getAttribute(IDENTIFIER_ATTR); |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
36 if (attr == null) { |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
37 attr = new StringAttribute(IDENTIFIER_ATTR, identifier, false); |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
38 addAttribute(IDENTIFIER_ATTR, attr); |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
39 } |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
40 else { |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
41 attr.setValue(identifier); |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
42 } |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
43 } |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
44 |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
45 |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
46 public void setLabel(String label) { |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
47 if (label == null) { |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
48 return; |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
49 } |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
50 |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
51 Attribute attr = getAttribute(LABEL_ATTR); |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
52 if (attr == null) { |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
53 attr = new StringAttribute(LABEL_ATTR, label, true); |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
54 addAttribute(LABEL_ATTR, attr); |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
55 } |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
56 else { |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
57 attr.setValue(label); |
0bd7c3cf0af1
Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1986
diff
changeset
|
58 } |
1986
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 } |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 |
1992
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
62 public void setFontSize(int fontSize) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
63 if (fontSize <= 0) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
64 return; |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
65 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
66 |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
67 Attribute attr = getAttribute(FONTSIZE_ATTR); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
68 if (attr == null) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
69 attr = new IntegerAttribute(FONTSIZE_ATTR, fontSize, true); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
70 addAttribute(FONTSIZE_ATTR, attr); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
71 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
72 else { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
73 attr.setValue(fontSize); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
74 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
75 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
76 |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
77 |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
78 public void setFixed(boolean fixed) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
79 Attribute attr = getAttribute(FIXATION_ATTR); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
80 if (attr == null) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
81 attr = new BooleanAttribute(FIXATION_ATTR, fixed, true); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
82 addAttribute(FIXATION_ATTR, attr); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
83 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
84 else { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
85 attr.setValue(fixed); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
86 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
87 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
88 |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
89 |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
90 public void setUpperRange(double upperRange) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
91 Attribute attr = getAttribute(UPPERRANGE_ATTR); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
92 if (attr == null) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
93 attr = new DoubleAttribute(UPPERRANGE_ATTR, upperRange, true); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
94 addAttribute(UPPERRANGE_ATTR, attr); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
95 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
96 else { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
97 attr.setValue(upperRange); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
98 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
99 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
100 |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
101 |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
102 public void setLowerRange(double lowerRange) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
103 Attribute attr = getAttribute(LOWERRANGE_ATTR); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
104 if (attr == null) { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
105 attr = new DoubleAttribute(LOWERRANGE_ATTR, lowerRange, true); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
106 addAttribute(LOWERRANGE_ATTR, attr); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
107 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
108 else { |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
109 attr.setValue(lowerRange); |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
110 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
111 } |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
112 |
e1c9f28e2675
Added more attributes to ChartSettings AxisSection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1991
diff
changeset
|
113 |
1986
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 @Override |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 public void toXML(Node parent) { |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 Document owner = parent.getOwnerDocument(); |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 Element axis = owner.createElement("axis"); |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 parent.appendChild(axis); |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
120 |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 for (String key: getKeys()) { |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 Attribute attr = getAttribute(key); |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 attr.toXML(axis); |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 } |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 } |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 } |
3632150dbe0b
Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |