Mercurial > dive4elements > river
changeset 4146:5589b1fd459d
Merged.
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 16 Oct 2012 11:28:33 +0200 |
parents | d39f229ea990 (diff) 58864f4f6e3b (current diff) |
children | 71a4b664a16a |
files | flys-artifacts/ChangeLog |
diffstat | 2 files changed, 30 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Oct 16 11:15:12 2012 +0200 +++ b/flys-artifacts/ChangeLog Tue Oct 16 11:28:33 2012 +0200 @@ -26,6 +26,13 @@ src/main/resources/messages_de_DE.properties: Fix typo +2012-10-16 Ingo Weinzierl <ingo@intevation.de> + + flys/issue930 + + * src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java: + Add unit [cm] to the facet description if calculation mode is W. + 2012-10-15 Ingo Weinzierl <ingo@intevation.de> flys/issue904 @@ -12808,7 +12815,6 @@ not. In addition, the scenario parameter used by WSPLGEN is now set correctly. ->>>>>>> .r3356 2011-12-05 Felix Wolfsteller <felix.wolfsteller@intevation.de> Allow longitudinal_section.q facets in wdiff states output.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java Tue Oct 16 11:15:12 2012 +0200 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java Tue Oct 16 11:28:33 2012 +0200 @@ -37,6 +37,8 @@ private static final Logger logger = Logger.getLogger(HistoricalDischargeComputeState.class); + public static final String DEFAULT_UNIT = "cm"; + @Override protected void appendItems( @@ -103,7 +105,7 @@ facets.add(new HistoricalDischargeFacet( i, HISTORICAL_DISCHARGE_Q, - wqt.getName())); + createFacetTitle(wqt))); if (wqt instanceof HistoricalWQTimerange) { logger.debug("Create another facet for historical differences."); @@ -117,5 +119,25 @@ i++; } } + + + protected String createFacetTitle(WQTimerange wqt) { + String name = wqt.getName(); + + return name != null && name.indexOf("W") >= 0 + ? createFacetTitleW(wqt) + : createFacetTitleQ(wqt); + } + + + protected String createFacetTitleW(WQTimerange wqt) { + String name = wqt.getName(); + return name + " " + DEFAULT_UNIT; + } + + + protected String createFacetTitleQ(WQTimerange wqt) { + return wqt.getName(); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :