org.apache.tapestry.contrib.table.model.simple
Class SimpleTableModel

java.lang.Object
  extended by org.apache.tapestry.contrib.table.model.common.AbstractTableModel
      extended by org.apache.tapestry.contrib.table.model.simple.SimpleTableModel
All Implemented Interfaces:
Serializable, ITableDataModelListener, ITableModel

public class SimpleTableModel
extends AbstractTableModel
implements ITableDataModelListener

A simple generic table model implementation.

Version:
$Id: SimpleTableModel.java 243791 2004-02-19 17:38:13Z hlship $
Author:
mindbridge
See Also:
Serialized Form

Constructor Summary
SimpleTableModel(ITableDataModel objDataModel, ITableColumnModel objColumnModel)
           
SimpleTableModel(ITableDataModel objDataModel, ITableColumnModel objColumnModel, SimpleTableState objState)
           
SimpleTableModel(Object[] arrData, ITableColumn[] arrColumns)
           
SimpleTableModel(Object[] arrData, ITableColumnModel objColumnModel)
           
 
Method Summary
 ITableColumnModel getColumnModel()
          Method getColumnModel.
 Iterator getCurrentPageRows()
          Method getCurrentPageRows.
 ITableDataModel getDataModel()
          Returns the dataModel.
 int getRowCount()
           
 void setDataModel(ITableDataModel dataModel)
          Sets the dataModel.
protected  void sortRows()
           
 void tableDataChanged(CTableDataModelEvent objEvent)
           
 
Methods inherited from class org.apache.tapestry.contrib.table.model.common.AbstractTableModel
getPageCount, getPagingState, getSortingState, getState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTableModel

public SimpleTableModel(Object[] arrData,
                        ITableColumn[] arrColumns)

SimpleTableModel

public SimpleTableModel(Object[] arrData,
                        ITableColumnModel objColumnModel)

SimpleTableModel

public SimpleTableModel(ITableDataModel objDataModel,
                        ITableColumnModel objColumnModel)

SimpleTableModel

public SimpleTableModel(ITableDataModel objDataModel,
                        ITableColumnModel objColumnModel,
                        SimpleTableState objState)
Method Detail

getColumnModel

public ITableColumnModel getColumnModel()
Description copied from interface: ITableModel
Method getColumnModel.

Specified by:
getColumnModel in interface ITableModel
Returns:
ITableColumnModel the column model of the table

getCurrentPageRows

public Iterator getCurrentPageRows()
Description copied from interface: ITableModel
Method getCurrentPageRows.

Specified by:
getCurrentPageRows in interface ITableModel
Returns:
Iterator the rows in the current table page given the current data, sorting, and paging state

getRowCount

public int getRowCount()
Specified by:
getRowCount in class AbstractTableModel

sortRows

protected void sortRows()

tableDataChanged

public void tableDataChanged(CTableDataModelEvent objEvent)
Specified by:
tableDataChanged in interface ITableDataModelListener

getDataModel

public ITableDataModel getDataModel()
Returns the dataModel.

Returns:
ITableDataModel

setDataModel

public void setDataModel(ITableDataModel dataModel)
Sets the dataModel.

Parameters:
dataModel - The dataModel to set