diff options
Diffstat (limited to 'source/com/c2kernel/gui/tabs/collection/CollectionView.java')
| -rwxr-xr-x | source/com/c2kernel/gui/tabs/collection/CollectionView.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/source/com/c2kernel/gui/tabs/collection/CollectionView.java b/source/com/c2kernel/gui/tabs/collection/CollectionView.java new file mode 100755 index 0000000..62a598c --- /dev/null +++ b/source/com/c2kernel/gui/tabs/collection/CollectionView.java @@ -0,0 +1,48 @@ +package com.c2kernel.gui.tabs.collection;
+
+import javax.swing.JPanel;
+
+import com.c2kernel.collection.Collection;
+import com.c2kernel.entity.proxy.ItemProxy;
+import com.c2kernel.gui.MainFrame;
+import com.c2kernel.utils.Logger;
+
+/**************************************************************************
+ *
+ * $Revision: 1.1 $
+ * $Date: 2004/08/10 07:56:08 $
+ *
+ * Copyright (C) 2003 CERN - European Organization for Nuclear Research
+ * All rights reserved.
+ **************************************************************************/
+
+
+public abstract class CollectionView extends JPanel {
+
+ protected Collection thisColl;
+ protected ItemProxy item;
+
+ public CollectionView() {
+ super();
+ }
+
+ public void setItem(ItemProxy entity) {
+ this.item = entity;
+ }
+
+ public abstract void setCollection(Collection coll);
+
+ protected void saveCollection()
+ {
+ try
+ {
+ String[] params = new String[1];
+ params[0] = com.c2kernel.utils.CastorXMLUtility.marshall(thisColl);
+ MainFrame.userAgent.execute(item, "AddC2KObject", params);
+ }
+ catch (Exception e)
+ {
+ Logger.error(e);
+ }
+ }
+}
|
