D - The class of the model object displayed in the table.public abstract class DefaultPageableTableModel<D> extends TableModel<D> implements PageableTableModel
TableModel used to display
instances of objects of the type specified. This model supports paged
display of the results to reduce the UI memory requirements.
© Copyright 2007 Sans Pareil Technologies, Inc.
| Modifier and Type | Field and Description |
|---|---|
protected int |
page
The current page being displayed in the table.
|
protected int |
pageSize
The number of rows to display on one page.
|
protected long |
totalRows
The total number of records available in the database.
|
columns, datasortDirection, sortIndex| Modifier | Constructor and Description |
|---|---|
protected |
DefaultPageableTableModel()
Default constructor.
|
|
DefaultPageableTableModel(Collection<D> collection)
Create a new instance of the model using the specified collection of
data objects.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getPage()
Returns
page. |
int |
getPageSize()
Returns
pageSize. |
int |
getTotalPages()
Return the total number of pages that may be displayed in the
TableNavigation associated with this model. |
addRow, deleteRow, deleteRow, getColumnAnnotations, getColumnClass, getColumnCount, getColumnName, getObjectAt, getRowCount, getValueAt, init, insertRow, processColumnAnnotations, processColumns, processColumnsAnnotation, processFields, updateRowgetSortDirectionaddTableModelListener, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getEventListenerList, removeTableModelListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetPage, setPageSizeprotected long totalRows
protected int page
protected int pageSize
protected DefaultPageableTableModel()
public DefaultPageableTableModel(Collection<D> collection)
collection - The collection of data objects to display in the
Table.public int getPage()
page.getPage in interface PageableTableModelpublic int getPageSize()
pageSize.getPageSize in interface PageableTableModelpublic int getTotalPages()
TableNavigation associated with this model.getTotalPages in interface PageableTableModel