[PATCH 3 of 9] Fix unit displayed in WFree calculation
Wald Commits
scm-commit at wald.intevation.org
Thu Mar 26 12:11:57 CET 2015
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1427366763 -3600
# Node ID 4f702ea1fd3a99a9e33d40774e563699d6a7ab17
# Parent 289486a43be8ba4d1a62b67bf28fe184dc3ef3f1
Fix unit displayed in WFree calculation
diff -r 289486a43be8 -r 4f702ea1fd3a gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java
--- 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();
diff -r 289486a43be8 -r 4f702ea1fd3a gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties
--- 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
diff -r 289486a43be8 -r 4f702ea1fd3a gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties
--- 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
diff -r 289486a43be8 -r 4f702ea1fd3a gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties
--- 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
diff -r 289486a43be8 -r 4f702ea1fd3a gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQInputPanel.java
--- 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);
}
More information about the Dive4Elements-commits
mailing list