|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.table.AbstractTableModel
echopoint.table.TableModelAdapter
echopoint.table.SortableTableModel
echopoint.table.SortablePagedTableModel
public class SortablePagedTableModel
The SortablePagedTableModel
is a SortableTabledModel
that
can be used to display a subset (ie. a page worth) of data at a time from an
underlying TableModel
and can also be sorted by column.
Field Summary |
---|
Fields inherited from class echopoint.table.SortableTableModel |
---|
COMPARATOR_STYLE_BEAN, COMPARATOR_STYLE_PROPERTYCOMPONENT, COMPARATOR_STYLE_VALUE, DOWN, NONE, UP |
Fields inherited from class echopoint.table.TableModelAdapter |
---|
model |
Fields inherited from class nextapp.echo.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
SortablePagedTableModel(TableModel model)
Creates a PagedTableModel that pages over the provided TableMode with a default page size of Integer.MAX_VALUE. |
|
SortablePagedTableModel(TableModel model,
int pageSize)
Creates a PagedTableModel that pages over the provided TableModel with a default page size of pageSize. |
Method Summary | |
---|---|
int |
getMaxPageIndex()
Gets the maximum number of pages that this model contains. |
int |
getModelRowIndex(int row)
This returns the "sorted" table model row index for a given "visual" table row index. |
int |
getPageIndex()
Gets the current page index. |
int |
getRowCount()
Returns the number of rows in the table. |
int |
getRowsPerPage()
Gets the number of rows per page. |
int |
getTotalRowCount()
Returns the total number of rows in the TableModel. |
java.lang.Object |
getValueAt(int column,
int row)
Returns the "sorted" value at the given column and row. |
void |
next()
Move forward a page, rolling over to 0 from getMaxPageIndex |
void |
previous()
Move back a page, rolling over to getMaxPageIndex from 0 |
void |
setPageIndex(int pageIndex)
Sets the current page index. |
void |
setRowsPerPage(int pageSize)
Sets the number of rows per page. |
Methods inherited from class echopoint.table.SortableTableModel |
---|
getColumnSortingState, getComparator, getComparatorStyle, getSortableRowIndex, isRowEditable, setComparator, setComparatorStyle, setModel, sortByColumn, sortByColumn, sortByColumns, tableChanged |
Methods inherited from class echopoint.table.TableModelAdapter |
---|
deleteRow, getColumnClass, getColumnCount, getColumnName, getModel, insertRow |
Methods inherited from class nextapp.echo.table.AbstractTableModel |
---|
addTableModelListener, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface nextapp.echo.table.TableModel |
---|
addTableModelListener, getColumnClass, getColumnCount, getColumnName, isRowEditable, removeTableModelListener |
Constructor Detail |
---|
public SortablePagedTableModel(TableModel model)
model
- - the underlying TabeModel to pagepublic SortablePagedTableModel(TableModel model, int pageSize)
model
- - the underlying TabeModel to pagepageSize
- - the number of rows in a pageMethod Detail |
---|
public void previous()
PagedTableModel
previous
in interface PagedTableModel
PagedTableModel.previous()
public void next()
PagedTableModel
next
in interface PagedTableModel
PagedTableModel.next()
public int getRowsPerPage()
PagedTableModel
getRowsPerPage
in interface PagedTableModel
PagedTableModel.getRowsPerPage()
public void setRowsPerPage(int pageSize)
PagedTableModel
setRowsPerPage
in interface PagedTableModel
pageSize
- - the number of rows per pagePagedTableModel.setRowsPerPage(int)
public int getPageIndex()
PagedTableModel
getPageIndex
in interface PagedTableModel
PagedTableModel.getPageIndex()
public void setPageIndex(int pageIndex)
PagedTableModel
setPageIndex
in interface PagedTableModel
pageIndex
- - the new page indexPagedTableModel.setPageIndex(int)
public int getMaxPageIndex()
PagedTableModel
getMaxPageIndex
in interface PagedTableModel
PagedTableModel.getMaxPageIndex()
public int getTotalRowCount()
PagedTableModel
Contrasts this with the getRowCount() method.
getTotalRowCount
in interface PagedTableModel
PagedTableModel.getTotalRowCount()
public int getModelRowIndex(int row)
SortableTableModel
getModelRowIndex
in class SortableTableModel
SortableTableModel.getModelRowIndex(int)
public int getRowCount()
TableModel
getRowCount
in interface PagedTableModel
getRowCount
in interface TableModel
getRowCount
in class TableModelAdapter
TableModel.getRowCount()
public java.lang.Object getValueAt(int column, int row)
SortableTableModel
getValueAt
in interface TableModel
getValueAt
in class SortableTableModel
column
- The column of the value to return.row
- The row of the value to return.TableModel.getValueAt(int, int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |