annotate gwt-client/src/main/java/org/dive4elements/river/client/shared/model/StringProperty.java @ 8871:78cd6572778d

Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui. Also using now the localization info from the server instead of localizing the modules again on the client side.
author gernotbelger
date Wed, 07 Feb 2018 12:02:58 +0100
parents ea9eef426962
children
rev   line source
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
6 * documentation coming with Dive4Elements River for details.
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
9 package org.dive4elements.river.client.shared.model;
1439
4df2d9a4b9b4 Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10
1503
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
11 import java.util.HashMap;
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
12
1439
4df2d9a4b9b4 Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 /**
4df2d9a4b9b4 Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
4df2d9a4b9b4 Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15 */
4df2d9a4b9b4 Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 public class StringProperty extends PropertySetting {
4df2d9a4b9b4 Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17
1503
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
18 /**
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
19 * Create a new StringProperty for settings.
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
20 */
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
21 public StringProperty() {
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
22 this.attributes = new HashMap<String, String>();
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
23 }
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
24
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
25
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
26 /**
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
27 * Create a new StringProperty.
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
28 * @param name The attribute name.
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
29 * @param value The current value.
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
30 */
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
31 public StringProperty(
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
32 String name,
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
33 String value)
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
34 {
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
35 this.name = name;
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
36 this.value = value;
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
37 this.attributes = new HashMap<String, String>();
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
38 }
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
39
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
40
1507
c21d14e48040 Improved validation and property handling.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1503
diff changeset
41 @Override
c21d14e48040 Improved validation and property handling.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1503
diff changeset
42 public String getValue() {
c21d14e48040 Improved validation and property handling.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1503
diff changeset
43 return this.value;
c21d14e48040 Improved validation and property handling.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1503
diff changeset
44 }
c21d14e48040 Improved validation and property handling.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1503
diff changeset
45
c21d14e48040 Improved validation and property handling.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1503
diff changeset
46
1503
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
47 public Object clone() {
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
48 StringProperty clone = new StringProperty(this.getName(),
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
49 this.getValue());
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
50 for(String s: this.getAttributeList()) {
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
51 clone.setAttribute(s, this.getAttribute(s));
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
52 }
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
53 return clone;
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
54 }
3509
bb5edff31866 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1507
diff changeset
55 }
bb5edff31866 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1507
diff changeset
56 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
1503
3304608baf35 Issue 433.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1463
diff changeset
57

http://dive4elements.wald.intevation.org