Mercurial > dive4elements > river
changeset 8624:4f702ea1fd3a
Fix unit displayed in WFree calculation
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 26 Mar 2015 11:46:03 +0100 |
parents | 289486a43be8 |
children | 362abb64e897 |
files | gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQInputPanel.java |
diffstat | 5 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Thu Mar 26 11:06:48 2015 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Thu Mar 26 11:46:03 2015 +0100 @@ -278,6 +278,8 @@ String unitWSingle(); + String unitWFree(); + String unitWFrom(); String unitWTo();
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Thu Mar 26 11:06:48 2015 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Thu Mar 26 11:46:03 2015 +0100 @@ -185,6 +185,7 @@ wqRange = Range unitWNN = W [NN+m] unitWSingle = cm +unitWFree = m+NHN unitWFrom = cm - unitWTo = cm a unitWStep = cm
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Thu Mar 26 11:06:48 2015 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Thu Mar 26 11:46:03 2015 +0100 @@ -172,6 +172,7 @@ wqRange = Wertebereich unitWNN = W [NN+m] unitWSingle = cm +unitWFree = m+NHN unitWFrom = cm - unitWTo = cm a unitWStep = cm
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties Thu Mar 26 11:06:48 2015 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties Thu Mar 26 11:46:03 2015 +0100 @@ -186,6 +186,7 @@ wqRange = Range unitWNN = W [NN+m] unitWSingle = cm +unitWFree = m+NHN unitWFrom = cm - unitWTo = cm a unitWStep = cm
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQInputPanel.java Thu Mar 26 11:06:48 2015 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQInputPanel.java Thu Mar 26 11:46:03 2015 +0100 @@ -344,7 +344,7 @@ DataItem[] single = dSingle.getItems(); vLabel = !isQMode - ? createWString(single[0]) + ? createWString(single[0], isFree) : createQString(single[0]); } else { @@ -599,14 +599,14 @@ } - protected VLayout createWString(DataItem single) { + protected VLayout createWString(DataItem single, boolean isFree) { String label = single.getLabel().trim(); String[] cols = label.split(";"); VLayout v = new VLayout(); for (String col: cols) { - Label l = new Label(col + " " + MESSAGE.unitWSingle()); + Label l = new Label(col + " " + (isFree ? MESSAGE.unitWFree() : MESSAGE.unitWSingle())); l.setHeight(20); v.addMember(l); @@ -1326,7 +1326,7 @@ double[] values = getSingleWFree(); wFreeArrayPanel = new DoubleArrayPanel( - MESSAGE.unitWSingle(), values, this); + MESSAGE.unitWFree(), values, this); container.addMember(wFreeArrayPanel); }