Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleRangePanel.java @ 580:42512fce9b1b
#140, #122: Splitted the WQD table in the WQInputPanel into two tables: a table for QD values and a table for W values - only the QD table is selectable.
flys-client/trunk@2164 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 20 Jun 2011 10:32:54 +0000 |
parents | 6ebe845a9d37 |
children | a39c2f531755 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleRangePanel.java Fri Jun 17 13:46:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleRangePanel.java Mon Jun 20 10:32:54 2011 +0000 @@ -218,5 +218,37 @@ return getDouble(v); } + + + /** + * Sets the value of the field with name <i>fieldname</i>. + * + * @param value The new value. + * @param fieldname The name of the field. + */ + public void setDoubleValue(double value, String fieldname) { + NumberFormat f = NumberFormat.getDecimalFormat(); + setValue(fieldname, f.format(value)); + } + + + /** + * Sets a new start value. + * + * @param value The new start value. + */ + public void setFrom(double value) { + setDoubleValue(value, FIELD_FROM); + } + + + /** + * Sets a new end value. + * + * @param value The new end value. + */ + public void setTo(double value) { + setDoubleValue(value, FIELD_TO); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :