edu.cmu.cs.sb.core
Class TableModelST

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by edu.cmu.cs.sb.core.TableModelST
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class TableModelST
extends javax.swing.table.AbstractTableModel

Class implements a standard table model

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TableModelST(java.lang.Object[][] data, java.lang.String[] columnNames)
          Initializes the table model with the data and columnNames parameters
TableModelST(java.util.Vector vdata, java.util.Vector vcolumnNames)
          Initializes the table model with the vector vdata and vcolumnNames parameters converting their contents into arrays.
 
Method Summary
 java.lang.Class getColumnClass(int c)
          Returns the Class type of column c
 int getColumnCount()
          Returns the number of columns
 java.lang.String getColumnName(int ncol)
          Returns the column name of ncol
 int getRowCount()
          Returns the number of rows
 java.lang.Object getValueAt(int nrow, int ncol)
          Returns the value in the table in row nrow and column ncol
 boolean isCellEditable(int rowIndex, int ColumnIndex)
          Always returns false, no cell is editable under this model
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableModelST

public TableModelST(java.lang.Object[][] data,
                    java.lang.String[] columnNames)
Initializes the table model with the data and columnNames parameters


TableModelST

public TableModelST(java.util.Vector vdata,
                    java.util.Vector vcolumnNames)
Initializes the table model with the vector vdata and vcolumnNames parameters converting their contents into arrays. Note vdata is a vector, and each element of the vector is another vector of the same size

Method Detail

getColumnClass

public java.lang.Class getColumnClass(int c)
Returns the Class type of column c

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int ColumnIndex)
Always returns false, no cell is editable under this model

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getColumnCount

public int getColumnCount()
Returns the number of columns


getRowCount

public int getRowCount()
Returns the number of rows


getColumnName

public java.lang.String getColumnName(int ncol)
Returns the column name of ncol

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getValueAt

public java.lang.Object getValueAt(int nrow,
                                   int ncol)
Returns the value in the table in row nrow and column ncol