Class ComputedDistanceModel

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

public class ComputedDistanceModel
extends javax.swing.table.AbstractTableModel

This class is used to set the computed distance table data in the FM algorithm.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ComputedDistanceModel(int inCount, java.lang.String[] inNames, double[][] inDistance)
          Construct the object with the specified values.
 
Method Summary
 java.lang.Class getColumnClass(int c)
          Overrides the method in the TableModel class and returns the class for each table column.
 int getColumnCount()
          Overrides the method in the TableModel class and returns the column count of the table.
 java.lang.String getColumnName(int columnIndex)
          Overrides the method in the TableModel class and returns the column names of the table.
 int getRowCount()
          Overrides the method in the TableModel class and returns the row count of the table.
 java.lang.Object getValueAt(int row, int col)
          Overrides the method in the TableModel class and returns the value of each table cell.
 
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

ComputedDistanceModel

public ComputedDistanceModel(int inCount,
                             java.lang.String[] inNames,
                             double[][] inDistance)
Construct the object with the specified values.

Parameters:
inCount - the number of species
inNames - the names of the species
inDistance - the computed distance matrix
Method Detail

getColumnCount

public int getColumnCount()
Overrides the method in the TableModel class and returns the column count of the table.

Returns:
the column count of the table

getRowCount

public int getRowCount()
Overrides the method in the TableModel class and returns the row count of the table.

Returns:
the row count of the table

getValueAt

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

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

getColumnName

public java.lang.String getColumnName(int columnIndex)
Overrides the method in the TableModel class and returns the column names of the table.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
columnIndex - the index of the column
Returns:
the name of the column

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