public abstract class PageTableModel
extends javax.swing.table.AbstractTableModel
Constructor and Description |
---|
PageTableModel()
Default constructor.
|
PageTableModel(int pageSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getPage()
Returns the current page.
|
int |
getPageCount()
Returns the number of pages.
|
int |
getPageSize()
Returns the page size.
|
int |
getRealRow(int row)
Returns the row number of data given the row number of current page.
|
abstract int |
getRealRowCount()
The sub class should implement this method to return the real number
of rows in the model.
|
int |
getRowCount() |
javax.swing.JToolBar |
getToolbar()
Returns a tool bar to control the plot.
|
java.lang.Object |
getValueAt(int row,
int col) |
abstract java.lang.Object |
getValueAtRealRow(int row,
int col)
Returns the value for the cell at real row index.
|
boolean |
pageDown()
Moves to next page and fire a data changed (all rows).
|
boolean |
pageUp()
Moves to previous page and fire a data changed (all rows).
|
boolean |
setPage(int p)
Moves to specific page and fire a data changed (all rows).
|
void |
setPageSize(int s)
Sets the page size.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
public PageTableModel()
public PageTableModel(int pageSize)
pageSize
- The number of rows per page.public int getRowCount()
public abstract int getRealRowCount()
public int getRealRow(int row)
row
- the row number in the current page.public java.lang.Object getValueAt(int row, int col)
public abstract java.lang.Object getValueAtRealRow(int row, int col)
row
- the real row whose value is to be queried.col
- the column whose value is to be queried.public int getPage()
public boolean setPage(int p)
public int getPageCount()
public int getPageSize()
public void setPageSize(int s)
s
- the page size.public boolean pageDown()
public boolean pageUp()
public javax.swing.JToolBar getToolbar()