Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionGenerator.java @ 1712:7e19449d7826
#253 Modified the title creation of chart curves - titles will now equal the Facet's description.
flys-artifacts/trunk@2984 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 17 Oct 2011 10:47:36 +0000 |
parents | bdb05dc9b763 |
children | 4cc21f0a470e |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionGenerator.java Mon Oct 17 08:45:26 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionGenerator.java Mon Oct 17 10:47:36 2011 +0000 @@ -56,14 +56,15 @@ Facet f = flys.getNativeFacet(facet); if (name.equals(DISCHARGE_LONGITUDINAL_W)) { - doWOut((WQKms) f.getData(artifact, context), attr, visible); + doWOut((WQKms) f.getData(artifact, context), facet, attr, visible); } else if (name.equals(DISCHARGE_LONGITUDINAL_Q)) { - doQOut((WQKms) f.getData(artifact, context), attr, visible); + doQOut((WQKms) f.getData(artifact, context), facet, attr, visible); } else if (name.equals(DISCHARGE_LONGITUDINAL_C)) { doCorrectedWOut( (WQCKms) f.getData(artifact, context), + facet, attr, visible); } @@ -81,6 +82,7 @@ */ protected void doCorrectedWOut( WQCKms wqckms, + Facet facet, Document theme, boolean visible ) { @@ -90,7 +92,7 @@ if (size > 0) { XYSeries series = new StyledXYSeries( - getSeriesNameForCorrected(wqckms, "W"), + facet.getDescription(), theme); for (int i = 0; i < size; i++) { @@ -104,20 +106,5 @@ setInverted(true); } } - - - protected String getSeriesNameForCorrected(WQKms wqkms, String mode) { - String name = wqkms.getName(); - - name = name.replace( - "benutzerdefiniert", - "benutzerdefiniert [korrigiert]"); - - String prefix = name.indexOf(mode) >= 0 ? null : mode; - - return prefix != null && prefix.length() > 0 - ? prefix + "(" + name + ")" - : name; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :