edu.upenn.crimson
Class TreeTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by edu.upenn.crimson.TreeTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class TreeTableModel
extends javax.swing.table.AbstractTableModel

TreeTableModel. This is a TableModel that is used by TreeManager to list the trees. It is maintained here so that it can be updated easily whenever the tree list is rebuilt.

Version:
$Id: TreeTableModel.java,v 1.12 2007/05/16 18:55:58 fisher Exp $
See Also:
Serialized Form

Field Summary
private  java.lang.String[] columnNames
           
private  java.util.ArrayList trees
          Stores the Trees that are in the table.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TreeTableModel()
           
 
Method Summary
 void addRow(Tree tree)
          Append a new row to the end of the table.
 void addRowAt(Tree tree, int row)
          Add new row to table.
 int getColumnCount()
           
 java.lang.String getColumnName(int col)
           
 Tree getRow(int row)
          Returns the Tree that represents the specified row in the table.
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int col)
          "ID", "Partitions", "Species", "maxTempDepth", "Tot Seq Length"
 void removeAllRows()
          Removes all rows from the table.
 void removeRow(int row)
          Removes the Tree that represents the specified row in the table.
 void removeRows(int[] rows)
          Removes the Trees that represent the rows specified.
 void removeRows(int minRow, int maxRow)
          Removes the Trees that represent the specified row in the table.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trees

private java.util.ArrayList trees
Stores the Trees that are in the table.


columnNames

private java.lang.String[] columnNames
Constructor Detail

TreeTableModel

public TreeTableModel()
Method Detail

addRow

public void addRow(Tree tree)
Append a new row to the end of the table.


addRowAt

public void addRowAt(Tree tree,
                     int row)
Add new row to table. If row index is '-1' then add to end of table.


getRow

public Tree getRow(int row)
Returns the Tree that represents the specified row in the table.


removeRow

public void removeRow(int row)
Removes the Tree that represents the specified row in the table.


removeRows

public void removeRows(int[] rows)
Removes the Trees that represent the rows specified.


removeRows

public void removeRows(int minRow,
                       int maxRow)
Removes the Trees that represent the specified row in the table. If the row is -1 then will clear the entire table.


removeAllRows

public void removeAllRows()
Removes all rows from the table.


getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getColumnName

public java.lang.String getColumnName(int col)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
"ID", "Partitions", "Species", "maxTempDepth", "Tot Seq Length"




Copyright 2006 Stephen Fisher, Susan Davidson, and Junhyong Kim, University of Pennsylvania.