X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fstructure%2FSimpleSElement.java;h=9faea935fb28ac7af3927e672985e719abaff436;hb=b784cf3cf0a72b72178fb9d69ccfdacaa2f4c5a6;hp=69c3e0905aca5529f4ff4592088f9d537aaa5eae;hpb=e860e15db1fd6dc797205de434c75a22f6e5f9a4;p=gpl%2Fargeo-slc.git
diff --git a/org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java b/org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java
index 69c3e0905..9faea935f 100644
--- a/org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java
+++ b/org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java
@@ -3,6 +3,8 @@ package org.argeo.slc.core.structure;
import java.util.Map;
import java.util.TreeMap;
+import javax.swing.tree.TreeSelectionModel;
+
/**
* Basic implementation of StructureElement
.
*
@@ -28,6 +30,12 @@ public class SimpleSElement implements StructureElement {
this(label != null ? label : defaultLabel);
}
+ /** Constructor */
+ public SimpleSElement(SimpleSElement sElement) {
+ setLabel(sElement.getLabel());
+ setTags(new TreeMap(sElement.getTags()));
+ }
+
public String getLabel() {
return label;
}
@@ -53,4 +61,9 @@ public class SimpleSElement implements StructureElement {
this.tags = tags;
}
+ @Override
+ public SimpleSElement clone(){
+ return new SimpleSElement(this);
+ }
+
}