Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java Thu May 03 07:48:12 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java Thu May 03 08:56:19 2012 +0000 @@ -25,6 +25,8 @@ import de.intevation.flys.geom.Lines; +import de.intevation.flys.utils.ThemeUtil; + /** * An OutGenerator that generates cross section graphs. @@ -221,9 +223,20 @@ Lines.LineData lines = (Lines.LineData) o; // DO NOT SORT DATA! This destroys the gaps indicated by NaNs StyledXYSeries series = new StyledXYSeries(seriesName, false, theme); - // TODO Label for line with infos if wished. - series.setLabel(series.getLabel() + lines.width); + // TODO i18n for all the label text and number format. + if (ThemeUtil.parseShowWidth(theme)) { + series.setLabel(series.getLabel() + ", b=" + lines.width + "m"); + } + else { + // Do not modify. + //series.setLabel(series.getLabel()); + } + if (ThemeUtil.parseShowLevel(theme) && lines.points.length >0 && lines.points[1].length > 0) { + series.setLabel(series.getLabel() + ", W=" + lines.points[1][0] + "NN+m"); + } + // TODO Missing: "mittlere hoehe" (and area but this geos to + // the area theme). StyledSeriesBuilder.addPoints(series, lines.points);