Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/PropertySetting.java Thu Dec 15 08:29:04 2011 +0000 @@ -0,0 +1,91 @@ +package de.intevation.flys.client.shared.model; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.ArrayList; + +import com.smartgwt.client.widgets.form.DynamicForm; + +import de.intevation.flys.client.client.ui.PropertyEditor; + +/** + * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> + */ +public class PropertySetting implements Property { + + /**The settings name.*/ + protected String name; + + /** The default value.*/ + protected String value; + + /** Additional attributes.*/ + protected HashMap<String, String> attributes; + + /** The editor dialog. */ + protected PropertyEditor editor; + + /** + * Create a new StyleSetting for theme attribution. + */ + public PropertySetting() { + this.attributes = new HashMap<String, String>(); + } + + + /** + * Create a new PropertySet. + * @param name The attribute name. + * @param value The current value. + */ + public PropertySetting( + String name, + String value) + { + this.name = name; + this.value = value; + this.attributes = new HashMap<String, String>(); + } + + public void setName(String name) { + this.name = name; + } + + public void setValue(String value) { + this.value = value; + } + + public void setAttribute(String key, String Value) { + attributes.put(key, value); + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + public String getAttribute(String key) { + return attributes.get(key); + } + + public ArrayList<String> getAttributeList() { + return new ArrayList<String>(attributes.keySet()); + } + + public DynamicForm generateUI() { + return new DynamicForm(); + } + + public void setEditor(PropertyEditor editor) { + this.editor = editor; + } + + public PropertyEditor getEditor() { + return this.editor; + } +} + +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :