diff options
| author | Andrew Branson <andrew@andrewbranson.net> | 2011-06-21 15:46:02 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew@andrewbranson.net> | 2011-06-21 15:46:02 +0200 |
| commit | 254ee6f47eebfc00462c10756a92066e82cc1a96 (patch) | |
| tree | 8273ff95c704e6faa3f92b4711253427b9ba0481 /source/com/c2kernel/collection/gui/view/PropertyPanel.java | |
Initial commit2.2
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");
+ }
+ }
+}
|
