Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java @ 2663:33d61e2a49a2
Added and respect two new properties of waterlevels in cross-sections.
flys-artifacts/trunk@4339 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 03 May 2012 08:56:19 +0000 |
parents | 9d2a06c3a134 |
children | 2be59d5b342c |
comparison
equal
deleted
inserted
replaced
2662:bdc86e61428c | 2663:33d61e2a49a2 |
---|---|
22 | 22 |
23 import de.intevation.flys.model.FastCrossSectionLine; | 23 import de.intevation.flys.model.FastCrossSectionLine; |
24 import de.intevation.flys.artifacts.model.HYKFactory; | 24 import de.intevation.flys.artifacts.model.HYKFactory; |
25 | 25 |
26 import de.intevation.flys.geom.Lines; | 26 import de.intevation.flys.geom.Lines; |
27 | |
28 import de.intevation.flys.utils.ThemeUtil; | |
27 | 29 |
28 | 30 |
29 /** | 31 /** |
30 * An OutGenerator that generates cross section graphs. | 32 * An OutGenerator that generates cross section graphs. |
31 */ | 33 */ |
219 logger.debug("CrossSectionGenerator.doCrossSectionWaterLineOut"); | 221 logger.debug("CrossSectionGenerator.doCrossSectionWaterLineOut"); |
220 | 222 |
221 Lines.LineData lines = (Lines.LineData) o; | 223 Lines.LineData lines = (Lines.LineData) o; |
222 // DO NOT SORT DATA! This destroys the gaps indicated by NaNs | 224 // DO NOT SORT DATA! This destroys the gaps indicated by NaNs |
223 StyledXYSeries series = new StyledXYSeries(seriesName, false, theme); | 225 StyledXYSeries series = new StyledXYSeries(seriesName, false, theme); |
224 // TODO Label for line with infos if wished. | 226 |
225 | 227 // TODO i18n for all the label text and number format. |
226 series.setLabel(series.getLabel() + lines.width); | 228 if (ThemeUtil.parseShowWidth(theme)) { |
229 series.setLabel(series.getLabel() + ", b=" + lines.width + "m"); | |
230 } | |
231 else { | |
232 // Do not modify. | |
233 //series.setLabel(series.getLabel()); | |
234 } | |
235 if (ThemeUtil.parseShowLevel(theme) && lines.points.length >0 && lines.points[1].length > 0) { | |
236 series.setLabel(series.getLabel() + ", W=" + lines.points[1][0] + "NN+m"); | |
237 } | |
238 // TODO Missing: "mittlere hoehe" (and area but this geos to | |
239 // the area theme). | |
227 | 240 |
228 StyledSeriesBuilder.addPoints(series, lines.points); | 241 StyledSeriesBuilder.addPoints(series, lines.points); |
229 | 242 |
230 addAxisSeries(series, 0, visible); | 243 addAxisSeries(series, 0, visible); |
231 } | 244 } |