Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WaterlevelGroundPanel.java @ 7731:91a57b66c7ed
Client side fix for flys/issue1549
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Mon, 20 Jan 2014 12:44:16 +0100 |
parents | caf9d989bd84 |
children | 316a9eeb0836 |
comparison
equal
deleted
inserted
replaced
7727:3d772f52080a | 7731:91a57b66c7ed |
---|---|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the | 5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
6 * documentation coming with Dive4Elements River for details. | 6 * documentation coming with Dive4Elements River for details. |
7 */ | 7 */ |
8 | 8 |
9 package org.dive4elements.river.client.client.ui; | 9 package org.dive4elements.river.client.client.ui; |
10 | |
11 import java.util.List; | |
10 | 12 |
11 public class WaterlevelGroundPanel extends DistancePanel { | 13 public class WaterlevelGroundPanel extends DistancePanel { |
12 | 14 |
13 private static final long serialVersionUID = 6598703468619862469L; | 15 private static final long serialVersionUID = 6598703468619862469L; |
14 | 16 |
121 @Override | 123 @Override |
122 protected void initHelperPanel() { | 124 protected void initHelperPanel() { |
123 // We don't need a helper panel here. But we have to override this | 125 // We don't need a helper panel here. But we have to override this |
124 // method to avoid the table creation in the parent class. | 126 // method to avoid the table creation in the parent class. |
125 } | 127 } |
128 | |
129 @Override | |
130 protected void validateTo(List<String> errors) { | |
131 double to = distancePanel.getTo(); | |
132 | |
133 if (to < 0d) { | |
134 distancePanel.setTo(max); | |
135 errors.add(MSG.negative_values_not_allowed_for_to()); | |
136 } | |
137 super.validateTo(errors); | |
138 } | |
126 } | 139 } |
127 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 140 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |