From 379ed8a0e133bee650e0acb24f6b743f657a50d0 Mon Sep 17 00:00:00 2001 From: abranson Date: Thu, 4 Aug 2011 16:08:49 +0200 Subject: Last bit of cleanup honest New castor and dependent commons libs --- .../gui/tabs/collection/CollectionHistoryWindow.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'source/com/c2kernel/gui/tabs/collection/CollectionHistoryWindow.java') 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 { ItemProxy item; - ArrayList collEvents, collEventData; - Collection coll; - public HistoryTableModel(ItemProxy item, Collection coll) { + ArrayList collEvents; + ArrayList collEventData; + Aggregation coll; + public HistoryTableModel(ItemProxy item, Aggregation coll) { this.item = item; this.coll = coll; - collEvents = new ArrayList(); + collEvents = new ArrayList(); collEventData = new ArrayList(); item.subscribe(new MemberSubscription(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); -- cgit v1.2.3