lcsim/src/org/lcsim/plugin/browser
diff -u -r1.8 -r1.9
--- CollectionTable.java 1 Jun 2007 23:58:58 -0000 1.8
+++ CollectionTable.java 2 Jun 2007 00:05:51 -0000 1.9
@@ -22,6 +22,7 @@
import javax.swing.table.TableModel;
import org.freehep.application.Application;
import org.freehep.application.studio.Studio;
+import org.freehep.swing.table.TableColumnPacker;
import org.freehep.util.ScientificFormat;
import org.lcsim.event.EventHeader;
import org.lcsim.event.EventHeader.LCMetaData;
@@ -34,7 +35,7 @@
/**
*
* @author tonyj
- * @version $Id: CollectionTable.java,v 1.8 2007/06/01 23:58:58 tonyj Exp $
+ * @version $Id: CollectionTable.java,v 1.9 2007/06/02 00:05:51 tonyj Exp $
*/
class CollectionTable extends JPanel implements ActionListener
{
@@ -49,7 +50,7 @@
private Studio m_app;
private Throwable error;
private Map<TableModel,SortableTableModel> sortedModels = new HashMap<TableModel,SortableTableModel>();
- private Map<TableModel,TableColumnModel> columnModels = new HashMap<TableModel,TableColumnModel>();
+ private TableColumnPacker tableColumnPacker = new TableColumnPacker();
CollectionTable(Studio app)
{
@@ -154,8 +155,8 @@
sortedModel = new DefaultSortableTableModel(model);
sortedModels.put(model,sortedModel);
}
- // This resets the columns, would be nice to try to keep them
m_table.setModel(sortedModel);
+ tableColumnPacker.packColumns(m_table);
ok = true;
break;
}