diff options
Diffstat (limited to 'source/com/c2kernel/collection/gui/view/PropertyPanel.java')
| -rwxr-xr-x | source/com/c2kernel/collection/gui/view/PropertyPanel.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/source/com/c2kernel/collection/gui/view/PropertyPanel.java b/source/com/c2kernel/collection/gui/view/PropertyPanel.java new file mode 100755 index 0000000..903ddf9 --- /dev/null +++ b/source/com/c2kernel/collection/gui/view/PropertyPanel.java @@ -0,0 +1,36 @@ +package com.c2kernel.collection.gui.view;
+
+import com.c2kernel.collection.AggregationMember;
+import com.c2kernel.collection.Collection;
+import com.c2kernel.collection.CollectionMember;
+import com.c2kernel.common.ObjectNotFoundException;
+import com.c2kernel.graph.model.Vertex;
+import com.c2kernel.graph.view.VertexPropertyPanel;
+
+public class PropertyPanel extends VertexPropertyPanel {
+
+ Collection mCollection;
+
+ public PropertyPanel() {
+ super();
+ }
+
+ public void setCollection(Collection collection) {
+ mCollection = collection;
+ }
+
+ public void setVertex(Vertex vert) {
+ try {
+ CollectionMember newMember = mCollection.getMember(vert.getID());
+ if (newMember instanceof AggregationMember) {
+ super.setVertex((AggregationMember)newMember);
+ return;
+ }
+ else
+ clear();
+ } catch (ObjectNotFoundException ex) {
+ clear();
+ selObjClass.setText("No Collection Member object found");
+ }
+ }
+}
|
