Class PreviousDistanceModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--InterDistanceModel
              |
              +--PreviousDistanceModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class PreviousDistanceModel
extends InterDistanceModel

This class is used to display the previous distance table in the previous state window.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class InterDistanceModel
distance, names
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
PreviousDistanceModel(FM fm)
          Constructs the data with the FM algorithm.
PreviousDistanceModel(NJ nj)
          Constructs the data with the NJ algorithm.
PreviousDistanceModel(UPGMA upgma)
          Constructs the data with the UPGMA algorithm.
 
Method Summary
 java.lang.Class getColumnClass(int c)
          Overrides the method in the TableModel class and returns the class for each table column.
 java.lang.Object getValueAt(int row, int col)
          Overrides the method in the InterDistanceModel class and returns the value of each table cell.
 
Methods inherited from class InterDistanceModel
getColumnCount, getColumnName, getCount, getRowCount, update, updateTable
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreviousDistanceModel

public PreviousDistanceModel(UPGMA upgma)
Constructs the data with the UPGMA algorithm.

Parameters:
upgma - the UPGMA algorithm

PreviousDistanceModel

public PreviousDistanceModel(NJ nj)
Constructs the data with the NJ algorithm.

Parameters:
nj - the NJ algorithm

PreviousDistanceModel

public PreviousDistanceModel(FM fm)
Constructs the data with the FM algorithm.

Parameters:
fm - the FM algorithm
Method Detail

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
Overrides the method in the InterDistanceModel class and returns the value of each table cell.

Specified by:
getValueAt in interface javax.swing.table.TableModel
Overrides:
getValueAt in class InterDistanceModel
Parameters:
row - the row whose value is to be queried
col - the column whose value is to be queried
Returns:
the value Object at the specified cell

getColumnClass

public java.lang.Class getColumnClass(int c)
Overrides the method in the TableModel class and returns the class for each table column.
JTable uses this method to determine the default renderer editor for each cell.

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
Parameters:
c - the index of the column
Returns:
the common ancestor class of the object values in the model