Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ReferenceCurveGenerator.java @ 2758:b05faaa9099b
Create points for ref.curve in facet, handle these in generator.
flys-artifacts/trunk@4493 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 24 May 2012 04:41:57 +0000 |
parents | 664f97b6d48f |
children | de60d1dfdcdf |
comparison
equal
deleted
inserted
replaced
2757:6e89147f5ca3 | 2758:b05faaa9099b |
---|---|
1 package de.intevation.flys.exports; | 1 package de.intevation.flys.exports; |
2 | |
3 import java.awt.geom.Point2D; | |
2 | 4 |
3 import org.w3c.dom.Document; | 5 import org.w3c.dom.Document; |
4 | 6 |
5 import org.apache.log4j.Logger; | 7 import org.apache.log4j.Logger; |
6 | 8 |
165 artifactFacet, | 167 artifactFacet, |
166 theme, | 168 theme, |
167 visible, | 169 visible, |
168 YAXIS.W.idx); | 170 YAXIS.W.idx); |
169 } | 171 } |
172 else if (name.equals(RELATIVE_POINT)) { | |
173 doPointOut( | |
174 (Point2D) artifactFacet.getData(context), | |
175 artifactFacet, | |
176 theme, | |
177 visible); | |
178 } | |
170 else { | 179 else { |
171 logger.warn("Unknown facet name: " + name); | 180 logger.warn("Unknown facet name: " + name); |
172 } | 181 } |
173 } | 182 } |
174 | 183 |
204 } | 213 } |
205 | 214 |
206 addAxisSeries(series, YAXIS.W.idx, visible); | 215 addAxisSeries(series, YAXIS.W.idx, visible); |
207 } | 216 } |
208 | 217 |
218 // TODO resolve duplicate in DurationCurveGenerator | |
219 protected void doPointOut( | |
220 Point2D point, | |
221 ArtifactAndFacet aandf, | |
222 Document theme, | |
223 boolean visible | |
224 ){ | |
225 logger.debug("ReferenceCurveGenerator.doPointOut"); | |
226 | |
227 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); | |
228 | |
229 series.add(point.getX(), point.getY()); | |
230 | |
231 addAxisSeries(series, YAXIS.W.idx, visible); | |
232 } | |
233 | |
209 protected void setAxisTickUnit(ValueAxis axis) { | 234 protected void setAxisTickUnit(ValueAxis axis) { |
210 TickUnits units = new TickUnits(); | 235 TickUnits units = new TickUnits(); |
211 units.add(new NumberTickUnit(1d, Formatter.getWaterlevelW(context))); | 236 units.add(new NumberTickUnit(1d, Formatter.getWaterlevelW(context))); |
212 axis.setStandardTickUnits(units); | 237 axis.setStandardTickUnits(units); |
213 axis.setAutoTickUnitSelection(true); | 238 axis.setAutoTickUnitSelection(true); |