Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DistancePanel.java @ 7745:1d6b957d8953
issue1549: Add live-validation to wsplgen to-field.
Unfortunately, controlling the displayed message proved difficult due
to mixed error/validation-handling code. It shows wrong format message
for now.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 11 Feb 2014 12:37:16 +0100 |
parents | 91a57b66c7ed |
children | 316a9eeb0836 |
comparison
equal
deleted
inserted
replaced
7744:8abc86160959 | 7745:1d6b957d8953 |
---|---|
95 | 95 |
96 public DistancePanel(String labelOrientation) { | 96 public DistancePanel(String labelOrientation) { |
97 distancePanel = new DoubleRangePanel( | 97 distancePanel = new DoubleRangePanel( |
98 labelFrom(), labelTo(), labelStep(), | 98 labelFrom(), labelTo(), labelStep(), |
99 0d, 0d, 0d, 250, this, labelOrientation); | 99 0d, 0d, 0d, 250, this, labelOrientation); |
100 distancePanel.setNegativeToAllowed(false); | |
100 } | 101 } |
101 | 102 |
102 | 103 |
103 @Override | 104 @Override |
104 public Canvas create(DataList data) { | 105 public Canvas create(DataList data) { |
421 protected double getDefaultStep() { | 422 protected double getDefaultStep() { |
422 return DEFAULT_STEP_WIDTH; | 423 return DEFAULT_STEP_WIDTH; |
423 } | 424 } |
424 | 425 |
425 | 426 |
427 /** Gets the double from default in data, null if none. */ | |
426 protected double getDefaultValue(Data data) | 428 protected double getDefaultValue(Data data) |
427 throws NumberFormatException | 429 throws NumberFormatException |
428 { | 430 { |
429 DataItem def = data.getDefault(); | 431 DataItem def = data.getDefault(); |
430 String defValue = def != null ? def.getStringValue() : null; | 432 String defValue = def != null ? def.getStringValue() : null; |