sg.edu.nus.gui.table
Class SortedTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by javax.swing.table.DefaultTableModel
          extended by sg.edu.nus.gui.table.SortedTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class SortedTableModel
extends javax.swing.table.DefaultTableModel

This class simply wraps the DefaultTableModel for dynamically insert, remove and update table cell data.

If necessary, some derived funtions of the DefaultTableModel should be customized for our own purpose.

See Also:
DefaultTableModel, Serialized Form

Constructor Summary
SortedTableModel(java.lang.String[] columns)
          Construct an empty table model with column names.
 
Method Summary
 boolean isCellEditable(int row, int col)
           
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortedTableModel

public SortedTableModel(java.lang.String[] columns)
Construct an empty table model with column names.

Parameters:
columns - the column names
Method Detail

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.DefaultTableModel