annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SingleBehaviour.java @ 9559:ba0561906f81

Uinfo inundation duration workflow (vegetation zones, scenario), wms-config changed
author gernotbelger
date Wed, 24 Oct 2018 18:40:38 +0200
parents 787fc085459b
children
rev   line source
9256
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
2 * Software engineering by
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
3 * Björnsen Beratende Ingenieure GmbH
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
5 *
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
6 * This file is Free Software under the GNU AGPL (>=v3)
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
8 * documentation coming with Dive4Elements River for details.
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
9 */
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
10 package org.dive4elements.river.client.client.ui.uinfo;
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
11
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
12 import java.util.List;
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
13
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
14 import org.dive4elements.river.client.client.FLYSConstants;
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
15
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
16 import com.smartgwt.client.widgets.form.fields.TextItem;
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
17
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
18 /**
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
19 * @author Domenico Nardi Tironi
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
20 *
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
21 */
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
22 public class SingleBehaviour extends ValidationBehaviourSingleMultiInputItem {
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
23
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
24 public SingleBehaviour(final List<String> validInputs, final String errorForItemMsg, final FLYSConstants MSG) {
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
25 super(validInputs, errorForItemMsg, MSG);
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
26 }
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
27
9270
7337034eb5d5 multiple whitespace input fix
gernotbelger
parents: 9256
diff changeset
28 public SingleBehaviour(final FLYSConstants msg) {
9559
ba0561906f81 Uinfo inundation duration workflow (vegetation zones, scenario), wms-config changed
gernotbelger
parents: 9481
diff changeset
29 super("", msg);
9256
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
30 }
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
31
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
32 @Override
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
33 public void appendValue(final TextItem inputItem, final String value) {
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
34 inputItem.setValue(value);
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
35 }
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
36
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
37 @Override
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
38 public List<String> validate(final List<String> errors, final String inputValueString) {
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
39 errors.addAll(this.validateSingleInput(inputValueString));
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
40 return errors;
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
41 }
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
42
9481
787fc085459b TSV introduced; uinfo.inundationWMS-Config
gernotbelger
parents: 9270
diff changeset
43 @Override
787fc085459b TSV introduced; uinfo.inundationWMS-Config
gernotbelger
parents: 9270
diff changeset
44 public boolean isMultipleInputsAllowed() {
787fc085459b TSV introduced; uinfo.inundationWMS-Config
gernotbelger
parents: 9270
diff changeset
45 return false;
787fc085459b TSV introduced; uinfo.inundationWMS-Config
gernotbelger
parents: 9270
diff changeset
46 }
787fc085459b TSV introduced; uinfo.inundationWMS-Config
gernotbelger
parents: 9270
diff changeset
47
787fc085459b TSV introduced; uinfo.inundationWMS-Config
gernotbelger
parents: 9270
diff changeset
48 @Override
787fc085459b TSV introduced; uinfo.inundationWMS-Config
gernotbelger
parents: 9270
diff changeset
49 public String titleForCreateOld() {
787fc085459b TSV introduced; uinfo.inundationWMS-Config
gernotbelger
parents: 9270
diff changeset
50 return null;
787fc085459b TSV introduced; uinfo.inundationWMS-Config
gernotbelger
parents: 9270
diff changeset
51 }
787fc085459b TSV introduced; uinfo.inundationWMS-Config
gernotbelger
parents: 9270
diff changeset
52
9256
6c24c857ccf9 fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
diff changeset
53 }

http://dive4elements.wald.intevation.org