|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PagedTableModel
PagedTableModel
interface defines a TableModel
that can be divided in "pages" of row data. Typically it will
report back the number of rows per page via the getRowCount() method.
The actual total number of rows is provided by the getTotalRowCount() method.
Method Summary | |
---|---|
int |
getMaxPageIndex()
Gets the maximum number of pages that this model contains. |
int |
getPageIndex()
Gets the current page index. |
int |
getRowCount()
In a PagedTableModel, this reports the minimum of the current rows per page or the number of rows left in the current page. |
int |
getRowsPerPage()
Gets the number of rows per page. |
int |
getTotalRowCount()
Returns the total number of rows in the TableModel. |
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 rowsPerPage)
Sets the number of rows per page. |
Methods inherited from interface nextapp.echo.table.TableModel |
---|
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getValueAt, isRowEditable, removeTableModelListener |
Method Detail |
---|
void previous()
void next()
int getRowsPerPage()
void setRowsPerPage(int rowsPerPage)
rowsPerPage
- - the number of rows per pageint getPageIndex()
void setPageIndex(int pageIndex)
pageIndex
- - the new page indexint getMaxPageIndex()
int getRowCount()
Constrast this with the original getRowCount() which reports the total number of rows in the model. This is needed to "trick" the visual Table component into thinking it sees a complete model of row data, when in fact it only sees a page.
getRowCount
in interface TableModel
TableModel.getRowCount()
int getTotalRowCount()
Contrasts this with the getRowCount() method.
getRowCount()
,
TableModel.getRowCount()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |