Mercurial > dive4elements > river
changeset 4149:71a4b664a16a
Merged.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 16 Oct 2012 11:36:21 +0200 |
parents | 1ba0927855b4 (current diff) 5589b1fd459d (diff) |
children | 0f60efc39953 |
files | |
diffstat | 2 files changed, 30 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Oct 16 11:35:36 2012 +0200 +++ b/flys-artifacts/ChangeLog Tue Oct 16 11:36:21 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:35:36 2012 +0200 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java Tue Oct 16 11:36:21 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 :