Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/AxisSection.java @ 2050:c4e0e433f825
Use axes ranges specified in ChartSettings for zooming in charts.
flys-artifacts/trunk@3540 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 27 Dec 2011 07:17:07 +0000 |
parents | e1c9f28e2675 |
children | 4ba5036109d2 |
comparison
equal
deleted
inserted
replaced
2049:2d5f2bc68cc6 | 2050:c4e0e433f825 |
---|---|
38 addAttribute(IDENTIFIER_ATTR, attr); | 38 addAttribute(IDENTIFIER_ATTR, attr); |
39 } | 39 } |
40 else { | 40 else { |
41 attr.setValue(identifier); | 41 attr.setValue(identifier); |
42 } | 42 } |
43 } | |
44 | |
45 | |
46 public String getIdentifier() { | |
47 StringAttribute attr = (StringAttribute) getAttribute(IDENTIFIER_ATTR); | |
48 | |
49 return attr != null ? (String) attr.getValue() : null; | |
43 } | 50 } |
44 | 51 |
45 | 52 |
46 public void setLabel(String label) { | 53 public void setLabel(String label) { |
47 if (label == null) { | 54 if (label == null) { |
85 attr.setValue(fixed); | 92 attr.setValue(fixed); |
86 } | 93 } |
87 } | 94 } |
88 | 95 |
89 | 96 |
97 public Boolean isFixed() { | |
98 BooleanAttribute attr = (BooleanAttribute) getAttribute(FIXATION_ATTR); | |
99 return attr != null ? (Boolean) attr.getValue() : null; | |
100 } | |
101 | |
102 | |
90 public void setUpperRange(double upperRange) { | 103 public void setUpperRange(double upperRange) { |
91 Attribute attr = getAttribute(UPPERRANGE_ATTR); | 104 Attribute attr = getAttribute(UPPERRANGE_ATTR); |
92 if (attr == null) { | 105 if (attr == null) { |
93 attr = new DoubleAttribute(UPPERRANGE_ATTR, upperRange, true); | 106 attr = new DoubleAttribute(UPPERRANGE_ATTR, upperRange, true); |
94 addAttribute(UPPERRANGE_ATTR, attr); | 107 addAttribute(UPPERRANGE_ATTR, attr); |
97 attr.setValue(upperRange); | 110 attr.setValue(upperRange); |
98 } | 111 } |
99 } | 112 } |
100 | 113 |
101 | 114 |
115 public Double getUpperRange() { | |
116 DoubleAttribute attr = (DoubleAttribute) getAttribute(UPPERRANGE_ATTR); | |
117 | |
118 return attr != null ? (Double) attr.getValue() : null; | |
119 } | |
120 | |
121 | |
102 public void setLowerRange(double lowerRange) { | 122 public void setLowerRange(double lowerRange) { |
103 Attribute attr = getAttribute(LOWERRANGE_ATTR); | 123 Attribute attr = getAttribute(LOWERRANGE_ATTR); |
104 if (attr == null) { | 124 if (attr == null) { |
105 attr = new DoubleAttribute(LOWERRANGE_ATTR, lowerRange, true); | 125 attr = new DoubleAttribute(LOWERRANGE_ATTR, lowerRange, true); |
106 addAttribute(LOWERRANGE_ATTR, attr); | 126 addAttribute(LOWERRANGE_ATTR, attr); |
107 } | 127 } |
108 else { | 128 else { |
109 attr.setValue(lowerRange); | 129 attr.setValue(lowerRange); |
110 } | 130 } |
131 } | |
132 | |
133 | |
134 public Double getLowerRange() { | |
135 DoubleAttribute attr = (DoubleAttribute) getAttribute(LOWERRANGE_ATTR); | |
136 | |
137 return attr != null ? (Double) attr.getValue() : null; | |
111 } | 138 } |
112 | 139 |
113 | 140 |
114 @Override | 141 @Override |
115 public void toXML(Node parent) { | 142 public void toXML(Node parent) { |