diff options
Diffstat (limited to 'source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java')
| -rw-r--r-- | source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java b/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java index 7cb2753..0f3cc76 100644 --- a/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java +++ b/source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java @@ -10,6 +10,7 @@ import javax.swing.JScrollPane; import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
+import com.c2kernel.collection.Aggregation;
import com.c2kernel.collection.Collection;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.entity.proxy.EntityProxy;
@@ -33,7 +34,7 @@ public class CollectionHistoryWindow extends JFrame { JTable historyTable;
HistoryTableModel historyModel;
- public CollectionHistoryWindow(ItemProxy item, Collection<?> coll) throws HeadlessException {
+ public CollectionHistoryWindow(ItemProxy item, Aggregation coll) throws HeadlessException {
super("Collection History");
historyModel = new HistoryTableModel(item, coll);
historyTable = new JTable(historyModel);
@@ -48,12 +49,13 @@ public class CollectionHistoryWindow extends JFrame { private class HistoryTableModel extends AbstractTableModel implements EntityProxyObserver<Event> {
ItemProxy item;
- ArrayList<Object> collEvents, collEventData;
- Collection<?> coll;
- public HistoryTableModel(ItemProxy item, Collection<?> coll) {
+ ArrayList<Event> collEvents;
+ ArrayList<Object> collEventData;
+ Aggregation coll;
+ public HistoryTableModel(ItemProxy item, Aggregation coll) {
this.item = item;
this.coll = coll;
- collEvents = new ArrayList<Object>();
+ collEvents = new ArrayList<Event>();
collEventData = new ArrayList<Object>();
item.subscribe(new MemberSubscription<Event>(this, ClusterStorage.HISTORY, true));
}
@@ -78,7 +80,7 @@ public class CollectionHistoryWindow extends JFrame { }
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
- Event ev = (Event)collEvents.get(rowIndex);
+ Event ev = collEvents.get(rowIndex);
switch (columnIndex) {
case 0:
return ev.getTimeString();
@@ -165,8 +167,8 @@ public class CollectionHistoryWindow extends JFrame { if (e.getClickCount()==2) {
int row = historyTable.getSelectedRow();
Object data = historyModel.getEventData(row);
- if (data instanceof Collection) {
- showColl((Collection<?>)data);
+ if (data instanceof Aggregation) {
+ showColl((Aggregation)data);
}
else {
String[] params = (String[])data;
@@ -177,7 +179,7 @@ public class CollectionHistoryWindow extends JFrame { }
}
}
- public void showColl(Collection<?> coll) {
+ public void showColl(Aggregation coll) {
JFrame newFrame = new JFrame();
AggregationView newView = new AggregationView();
newView.setCollection(coll);
|
