com.fruitioninc.jwc
Class DefaultTableModel

java.lang.Object
  |
  +--com.fruitioninc.jwc.AbstractModel
        |
        +--com.fruitioninc.jwc.AbstractTableModel
              |
              +--com.fruitioninc.jwc.DefaultTableModel
All Implemented Interfaces:
Model, TableModel

public class DefaultTableModel
extends AbstractTableModel

A TableModel which stores its state in member variables.


Constructor Summary
DefaultTableModel(java.lang.String[] columnNames, java.lang.Object[][] data)
          Creates a non-state-full DefaultTableModel
DefaultTableModel(java.lang.String[] columnNames, java.lang.Object[][] data, boolean statefull)
          Creates a DefaultTableModel
 
Method Summary
 java.lang.Class getColumnClass(int column)
          Returns the type of data in the column of a given index.
 int getColumnCount()
          Returns the number of columns in the table.
 java.lang.String getColumnName(int column)
          Returns the name of the column of a given index.
 java.lang.String getColumnTitle(int column)
          Returns title of the column of a given index.
 int getRowCount()
          Returns the number of rows in the table.
 java.lang.Object getValueAt(int row, int column)
          Returns value of the cell in the given row and column.
 boolean isEditable(int row, int column)
          Returns true if the cell is editable.
 void setValueAt(int row, int column, java.lang.Object value)
          Sets the value of the cell in the given row and column.
 
Methods inherited from class com.fruitioninc.jwc.AbstractModel
_getStatefull, _setStatefull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.fruitioninc.jwc.Model
_getStatefull, _setStatefull
 

Constructor Detail

DefaultTableModel

public DefaultTableModel(java.lang.String[] columnNames,
                         java.lang.Object[][] data)
Creates a non-state-full DefaultTableModel

Parameters:
columnNames - names of the columns in the table

DefaultTableModel

public DefaultTableModel(java.lang.String[] columnNames,
                         java.lang.Object[][] data,
                         boolean statefull)
Creates a DefaultTableModel

Parameters:
columnNames - names of the columns in the table
Method Detail

getColumnCount

public int getColumnCount()
Description copied from interface: TableModel
Returns the number of columns in the table.


getColumnName

public java.lang.String getColumnName(int column)
Description copied from interface: TableModel
Returns the name of the column of a given index.


getColumnTitle

public java.lang.String getColumnTitle(int column)
Description copied from interface: TableModel
Returns title of the column of a given index. This is the text displayed in the column's header.


getColumnClass

public java.lang.Class getColumnClass(int column)
Description copied from interface: TableModel
Returns the type of data in the column of a given index.


getRowCount

public int getRowCount()
Description copied from interface: TableModel
Returns the number of rows in the table.


getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
Description copied from interface: TableModel
Returns value of the cell in the given row and column.


setValueAt

public void setValueAt(int row,
                       int column,
                       java.lang.Object value)
Description copied from interface: TableModel
Sets the value of the cell in the given row and column.


isEditable

public boolean isEditable(int row,
                          int column)
Description copied from interface: TableModel
Returns true if the cell is editable.