wt.clients.beans.table
Class WTTableModel.GroupTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended bywt.clients.beans.table.WTAbstractTableModel
          extended bywt.clients.beans.table.WTTableModel.GroupTableModel
All Implemented Interfaces:
Serializable, TableModel
Enclosing class:
WTTableModel

public class WTTableModel.GroupTableModel
extends WTAbstractTableModel

Provide a table model compatible with Swing that display the data based on the filtering, grouping and sorting parameters set in the WTTableModel.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class wt.clients.beans.table.WTAbstractTableModel
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
WTTableModel.GroupTableModel()
          Construct a new GroupTableModel
 
Method Summary
 int getRowCount()
          Returns the number of records managed by the data source object.
 Object getValueAt(int rowIndex, int columnIndex)
          Returns an attribute value for the cell at columnIndex and rowIndex.
 boolean isCellEditable(int rowIndex, int columnIndex)
          Returns true if the cell at rowIndex and columnIndex is editable.
 void refreshModel()
          Force the refresh of the data but because the table is entirely dynamic, the method just notify the listener of a change in the model.
 void setValueAt(Object aValue, int rowIndex, int columnIndex)
          Sets an attribute value for the record in the cell at columnIndex and rowIndex.
 
Methods inherited from class wt.clients.beans.table.WTAbstractTableModel
addColumn, addColumns, getColumn, getColumnClass, getColumnCount, getColumnName, getColumns, getHeaderKeys, getHeaders, getHeaderSizes, getTableColumnModel, removeColumn, setTableColumnModel
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WTTableModel.GroupTableModel

public WTTableModel.GroupTableModel()
Construct a new GroupTableModel

Method Detail

refreshModel

public void refreshModel()
Force the refresh of the data but because the table is entirely dynamic, the method just notify the listener of a change in the model.


getRowCount

public int getRowCount()
Returns the number of records managed by the data source object. A JTable uses this method to determine how many rows it should create and display. This method should be quick, as it is call by JTable quite frequently.

Returns:
the number or rows in the model
See Also:
WTAbstractTableModel.getColumnCount()

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Returns true if the cell at rowIndex and columnIndex is editable. Otherwise, setValueAt() on the cell will not change the value of that cell.

Parameters:
rowIndex - the row whose value is to be looked up
columnIndex - the column whose value is to be looked up
Returns:
true if the cell is editable.
See Also:
#setValueAt()

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Returns an attribute value for the cell at columnIndex and rowIndex.

Parameters:
rowIndex - the row whose value is to be looked up
columnIndex - the column whose value is to be looked up
Returns:
the value Object at the specified cell

setValueAt

public void setValueAt(Object aValue,
                       int rowIndex,
                       int columnIndex)
Sets an attribute value for the record in the cell at columnIndex and rowIndex. aValue is the new value.

Parameters:
aValue - the new value
rowIndex - the row whose value is to be changed
columnIndex - the column whose value is to be changed
See Also:
#getValueAt(), #isCellEditable()