Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/PropertySetting.java @ 1439:4df2d9a4b9b4
Added interfaces and container for output settings.
Added settings container to collection.
Extract settings from describe collection document.
flys-client/trunk@3420 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 15 Dec 2011 08:29:04 +0000 |
parents | |
children | 8da36efc839a |
comparison
equal
deleted
inserted
replaced
1438:432180235caf | 1439:4df2d9a4b9b4 |
---|---|
1 package de.intevation.flys.client.shared.model; | |
2 | |
3 import java.io.Serializable; | |
4 import java.util.HashMap; | |
5 import java.util.ArrayList; | |
6 | |
7 import com.smartgwt.client.widgets.form.DynamicForm; | |
8 | |
9 import de.intevation.flys.client.client.ui.PropertyEditor; | |
10 | |
11 /** | |
12 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> | |
13 */ | |
14 public class PropertySetting implements Property { | |
15 | |
16 /**The settings name.*/ | |
17 protected String name; | |
18 | |
19 /** The default value.*/ | |
20 protected String value; | |
21 | |
22 /** Additional attributes.*/ | |
23 protected HashMap<String, String> attributes; | |
24 | |
25 /** The editor dialog. */ | |
26 protected PropertyEditor editor; | |
27 | |
28 /** | |
29 * Create a new StyleSetting for theme attribution. | |
30 */ | |
31 public PropertySetting() { | |
32 this.attributes = new HashMap<String, String>(); | |
33 } | |
34 | |
35 | |
36 /** | |
37 * Create a new PropertySet. | |
38 * @param name The attribute name. | |
39 * @param value The current value. | |
40 */ | |
41 public PropertySetting( | |
42 String name, | |
43 String value) | |
44 { | |
45 this.name = name; | |
46 this.value = value; | |
47 this.attributes = new HashMap<String, String>(); | |
48 } | |
49 | |
50 public void setName(String name) { | |
51 this.name = name; | |
52 } | |
53 | |
54 public void setValue(String value) { | |
55 this.value = value; | |
56 } | |
57 | |
58 public void setAttribute(String key, String Value) { | |
59 attributes.put(key, value); | |
60 } | |
61 | |
62 public String getName() { | |
63 return this.name; | |
64 } | |
65 | |
66 public String getValue() { | |
67 return this.value; | |
68 } | |
69 | |
70 public String getAttribute(String key) { | |
71 return attributes.get(key); | |
72 } | |
73 | |
74 public ArrayList<String> getAttributeList() { | |
75 return new ArrayList<String>(attributes.keySet()); | |
76 } | |
77 | |
78 public DynamicForm generateUI() { | |
79 return new DynamicForm(); | |
80 } | |
81 | |
82 public void setEditor(PropertyEditor editor) { | |
83 this.editor = editor; | |
84 } | |
85 | |
86 public PropertyEditor getEditor() { | |
87 return this.editor; | |
88 } | |
89 } | |
90 | |
91 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |