Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java @ 2750:97cb098dbf7a
Handle relative points in duration curve diagram.
flys-artifacts/trunk@4485 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 23 May 2012 20:45:10 +0000 |
parents | 0ca00d547f35 |
children | 97ad960f5579 |
comparison
equal
deleted
inserted
replaced
2749:5eb3edb4f37b | 2750:97cb098dbf7a |
---|---|
1 package de.intevation.flys.exports; | 1 package de.intevation.flys.exports; |
2 | 2 |
3 import java.awt.Font; | 3 import java.awt.Font; |
4 import java.awt.geom.Point2D; | |
4 | 5 |
5 import org.w3c.dom.Document; | 6 import org.w3c.dom.Document; |
6 | 7 |
7 import org.apache.log4j.Logger; | 8 import org.apache.log4j.Logger; |
8 | 9 |
214 (FLYSAnnotation) artifactFacet.getData(context), | 215 (FLYSAnnotation) artifactFacet.getData(context), |
215 artifactFacet, | 216 artifactFacet, |
216 attr, | 217 attr, |
217 visible); | 218 visible); |
218 } | 219 } |
220 else if (name.equals(RELATIVE_POINT)) { | |
221 doPointOut((Point2D) artifactFacet.getData(context), | |
222 artifactFacet, | |
223 attr, | |
224 visible); | |
225 } | |
219 else if (FacetTypes.IS.MANUALPOINTS(name)) { | 226 else if (FacetTypes.IS.MANUALPOINTS(name)) { |
220 doPoints( | 227 doPoints( |
221 artifactFacet.getData(context), | 228 artifactFacet.getData(context), |
222 artifactFacet, | 229 artifactFacet, |
223 attr, visible, YAXIS.W.idx); | 230 attr, visible, YAXIS.W.idx); |
254 } | 261 } |
255 | 262 |
256 addAxisSeries(series, YAXIS.W.idx, visible); | 263 addAxisSeries(series, YAXIS.W.idx, visible); |
257 } | 264 } |
258 | 265 |
266 protected void doPointOut( | |
267 Point2D point, | |
268 ArtifactAndFacet aandf, | |
269 Document theme, | |
270 boolean visible | |
271 ){ | |
272 logger.debug("DurationCurveGenerator.doPointOut"); | |
273 | |
274 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); | |
275 | |
276 series.add(point.getX(), point.getY()); | |
277 | |
278 addAxisSeries(series, YAXIS.W.idx, visible); | |
279 } | |
280 | |
259 | 281 |
260 /** | 282 /** |
261 * Creates the series for a duration curve's Q facet. | 283 * Creates the series for a duration curve's Q facet. |
262 * | 284 * |
263 * @param wqdays The WQDay store that contains the Qs. | 285 * @param wqdays The WQDay store that contains the Qs. |