Mercurial > dive4elements > river
annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/sinfo/FlowDepthTwinPanelValidator.java @ 8993:0adc6d04de95
SInfo - FlowDepthMinMax: choosing bed heights, not bed height min and max separately
author | gernotbelger |
---|---|
date | Wed, 11 Apr 2018 14:09:13 +0200 |
parents | 7bbfb24e6eec |
children |
rev | line source |
---|---|
8854 | 1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde |
8993
0adc6d04de95
SInfo - FlowDepthMinMax: choosing bed heights, not bed height min and max separately
gernotbelger
parents:
8854
diff
changeset
|
2 * Software engineering by |
0adc6d04de95
SInfo - FlowDepthMinMax: choosing bed heights, not bed height min and max separately
gernotbelger
parents:
8854
diff
changeset
|
3 * Björnsen Beratende Ingenieure GmbH |
8854 | 4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
10 package org.dive4elements.river.client.client.ui.sinfo; | |
11 | |
12 import java.util.ArrayList; | |
13 import java.util.List; | |
14 | |
15 import org.dive4elements.river.client.client.FLYSConstants; | |
16 import org.dive4elements.river.client.client.ui.AbstractPairRecommendationPanel.IValidator; | |
17 | |
18 import com.smartgwt.client.widgets.grid.ListGrid; | |
19 | |
20 /** | |
21 * Contains the old code from the validate-method of the DatacageTwinPanel. | |
8993
0adc6d04de95
SInfo - FlowDepthMinMax: choosing bed heights, not bed height min and max separately
gernotbelger
parents:
8854
diff
changeset
|
22 * |
8854 | 23 * @author Gernot Belger |
24 */ | |
25 final class FlowDepthTwinPanelValidator implements IValidator { | |
26 | |
8993
0adc6d04de95
SInfo - FlowDepthMinMax: choosing bed heights, not bed height min and max separately
gernotbelger
parents:
8854
diff
changeset
|
27 @Override |
0adc6d04de95
SInfo - FlowDepthMinMax: choosing bed heights, not bed height min and max separately
gernotbelger
parents:
8854
diff
changeset
|
28 public List<String> validate(final ListGrid differencesList, final FLYSConstants msgProvider) { |
8854 | 29 |
30 final List<String> errors = new ArrayList<String>(); | |
31 if (differencesList.getRecords().length == 0) { | |
8993
0adc6d04de95
SInfo - FlowDepthMinMax: choosing bed heights, not bed height min and max separately
gernotbelger
parents:
8854
diff
changeset
|
32 // FIXME: waterlevel dependent! This will lead to a bad error message in English, for M-Info/Bed-Differences calculation |
8854 | 33 errors.add(msgProvider.sinfo_flowdepth_twinpanel_no_pair_selected()); |
34 } | |
35 | |
36 return errors; | |
8993
0adc6d04de95
SInfo - FlowDepthMinMax: choosing bed heights, not bed height min and max separately
gernotbelger
parents:
8854
diff
changeset
|
37 } |
8854 | 38 } |