EVolve.visualization
Class TableVizModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--EVolve.visualization.TableVizModel
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, javax.swing.table.TableModel

public class TableVizModel
extends javax.swing.table.AbstractTableModel
implements java.lang.Cloneable

Model of a two-column table.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TableVizModel()
          Creates a table model.
 
Method Summary
 java.lang.Object clone()
           
 int getColumnCount()
          Gets the number of columns.
 java.lang.String getColumnName(int col)
          Gets the name of a column
 int getRowCount()
          Gets the number of rows.
 java.lang.Object getValueAt(int row, int col)
          Gets the value of the table.
 boolean isCellEditable(int row, int col)
          Whether the cell is editable.
 void setName(java.lang.String nameLeft, java.lang.String nameRight)
          Sets the names of the columns.
 void setValue(java.lang.String[] left, int[] right)
          Sets the value of the table.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableVizModel

public TableVizModel()
Creates a table model.

Method Detail

getColumnCount

public int getColumnCount()
Gets the number of columns.

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Returns:
number of columns

getColumnName

public java.lang.String getColumnName(int col)
Gets the name of a column

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

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
Gets the value of the table.

Specified by:
getValueAt in interface javax.swing.table.TableModel
Parameters:
row - the row
col - the column
Returns:
the value

getRowCount

public int getRowCount()
Gets the number of rows.

Specified by:
getRowCount in interface javax.swing.table.TableModel
Returns:
number of rows

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Whether the cell is editable.

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel
Parameters:
row - the row
col - the column
Returns:
false, not editable

setName

public void setName(java.lang.String nameLeft,
                    java.lang.String nameRight)
Sets the names of the columns.

Parameters:
nameLeft - name of the left column
nameRight - name of the right column

setValue

public void setValue(java.lang.String[] left,
                     int[] right)
Sets the value of the table.

Parameters:
left - the left column
right - the right column

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object