comparison 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
comparison
equal deleted inserted replaced
8981:2e27061d9a93 8993:0adc6d04de95
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde 1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
2 * Software engineering by 2 * Software engineering by
3 * Björnsen Beratende Ingenieure GmbH 3 * Björnsen Beratende Ingenieure GmbH
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt 4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
5 * 5 *
6 * This file is Free Software under the GNU AGPL (>=v3) 6 * This file is Free Software under the GNU AGPL (>=v3)
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the 7 * and comes with ABSOLUTELY NO WARRANTY! Check out the
8 * documentation coming with Dive4Elements River for details. 8 * documentation coming with Dive4Elements River for details.
14 14
15 import org.dive4elements.river.client.client.FLYSConstants; 15 import org.dive4elements.river.client.client.FLYSConstants;
16 import org.dive4elements.river.client.client.ui.AbstractPairRecommendationPanel.IValidator; 16 import org.dive4elements.river.client.client.ui.AbstractPairRecommendationPanel.IValidator;
17 17
18 import com.smartgwt.client.widgets.grid.ListGrid; 18 import com.smartgwt.client.widgets.grid.ListGrid;
19 import com.smartgwt.client.widgets.grid.ListGridRecord;
20 19
21 /** 20 /**
22 * Contains the old code from the validate-method of the DatacageTwinPanel. 21 * Contains the old code from the validate-method of the DatacageTwinPanel.
23 * 22 *
24 * @author Gernot Belger 23 * @author Gernot Belger
25 */ 24 */
26 final class FlowDepthTwinPanelValidator implements IValidator { 25 final class FlowDepthTwinPanelValidator implements IValidator {
27 26
28 @Override 27 @Override
29 public List<String> validate(final ListGrid differencesList, final FLYSConstants msgProvider) { 28 public List<String> validate(final ListGrid differencesList, final FLYSConstants msgProvider) {
30 29
31 final List<String> errors = new ArrayList<String>(); 30 final List<String> errors = new ArrayList<String>();
32 if (differencesList.getRecords().length == 0) { 31 if (differencesList.getRecords().length == 0) {
33 // FIXME: waterlevel dependent! This will lead to a bad error message in English, for M-Info/Bed-Differences calculation 32 // FIXME: waterlevel dependent! This will lead to a bad error message in English, for M-Info/Bed-Differences calculation
34 errors.add(msgProvider.sinfo_flowdepth_twinpanel_no_pair_selected()); 33 errors.add(msgProvider.sinfo_flowdepth_twinpanel_no_pair_selected());
35 } 34 }
36 35
37 return errors; 36 return errors;
38 } 37 }
39 } 38 }

http://dive4elements.wald.intevation.org