diff flys-client/src/main/java/de/intevation/flys/client/shared/model/StringProperty.java @ 1503:3304608baf35

Issue 433. Allways load original chart settings when opening the dialog. flys-client/trunk@3632 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 09 Jan 2012 17:07:17 +0000
parents 14ce1c2a9f6c
children c21d14e48040
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/StringProperty.java	Mon Jan 09 14:28:37 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/StringProperty.java	Mon Jan 09 17:07:17 2012 +0000
@@ -1,8 +1,42 @@
 package de.intevation.flys.client.shared.model;
 
+import java.util.HashMap;
+
 /**
  * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
  */
 public class StringProperty extends PropertySetting {
 
+    /**
+     * Create a new StringProperty for settings.
+     */
+    public StringProperty() {
+        this.attributes = new HashMap<String, String>();
+    }
+
+
+    /**
+     * Create a new StringProperty.
+     * @param name The attribute name.
+     * @param value The current value.
+     */
+    public StringProperty(
+        String name,
+        String value)
+    {
+        this.name = name;
+        this.value = value;
+        this.attributes = new HashMap<String, String>();
+    }
+
+
+    public Object clone() {
+        StringProperty clone = new StringProperty(this.getName(),
+                                                    this.getValue());
+        for(String s: this.getAttributeList()) {
+            clone.setAttribute(s, this.getAttribute(s));
+        }
+        return clone;
+    }
+
 }

http://dive4elements.wald.intevation.org