Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/shared/model/PropertySetting.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 | 237e7450ae2e |
children | c21d14e48040 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/PropertySetting.java Mon Jan 09 14:28:37 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/PropertySetting.java Mon Jan 09 17:07:17 2012 +0000 @@ -6,7 +6,7 @@ /** * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> */ -public class PropertySetting implements Property { +public class PropertySetting implements Property, Cloneable { /**The settings name.*/ protected String name; @@ -66,5 +66,15 @@ public ArrayList<String> getAttributeList() { return new ArrayList<String>(attributes.keySet()); } + + + public Object clone() { + PropertySetting clone = new PropertySetting(this.getName(), + this.getValue()); + for(String s: this.getAttributeList()) { + clone.setAttribute(s, this.getAttribute(s)); + } + return clone; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :