public abstract class AbstractPageControl<C extends JComponent> extends Object implements PageControl
Modifier and Type | Field and Description |
---|---|
protected List<ChangeListener> |
changeListeners |
protected C |
component |
protected QueryInfo |
lastQuery |
static XdevLogger |
log |
protected DBPager |
pager |
protected int |
rowsPerPage |
DYNAMIC_ROW_COUNT
Constructor and Description |
---|
AbstractPageControl(C c) |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener l)
Adds a changelistener which listens for data or position changes
|
void |
changeModel(SELECT select,
Object[] params,
int showPageIndex) |
void |
firstPage()
Scrolls to the first page
|
protected int |
getActualRowCount() |
int |
getCurrentPageIndex() |
int |
getMaxPageIndex() |
int |
getRowsPerPage() |
abstract int |
getVisibleRowCount() |
void |
gotoPage(int page)
Scrolls to the given pageNumber
|
protected void |
handle(Throwable e) |
boolean |
hasNextPage() |
boolean |
hasPreviousPage() |
void |
lastPage()
Scrolls to the last page
|
void |
nextPage()
Scrolls to the next page
|
void |
previousPage()
Scrolls to the previous page
|
void |
refresh()
refreshes the current view
|
protected void |
rowsPerPageChanged() |
void |
setRowsPerPage(int rowsPerPage) |
protected void |
updateModel(Result data) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVirtualTable, isSingleRowPager
public static final XdevLogger log
protected final C extends JComponent component
protected DBPager pager
protected List<ChangeListener> changeListeners
protected QueryInfo lastQuery
protected int rowsPerPage
public AbstractPageControl(C c)
public void addChangeListener(ChangeListener l)
PageControl
addChangeListener
in interface PageControl
public void refresh()
PageControl
refresh
in interface PageControl
public void changeModel(SELECT select, Object[] params, int showPageIndex) throws DBException
DBException
protected void updateModel(Result data) throws VirtualTableException, DBException
VirtualTableException
DBException
public boolean hasNextPage()
hasNextPage
in interface PageControl
true
if the pager can go forwardpublic boolean hasPreviousPage()
hasPreviousPage
in interface PageControl
true
if the pager can go backwardpublic void nextPage()
PageControl
nextPage
in interface PageControl
public void previousPage()
PageControl
previousPage
in interface PageControl
public void firstPage()
PageControl
firstPage
in interface PageControl
public void lastPage()
PageControl
lastPage
in interface PageControl
public void gotoPage(int page)
PageControl
gotoPage
in interface PageControl
public int getCurrentPageIndex()
getCurrentPageIndex
in interface PageControl
public int getMaxPageIndex()
getMaxPageIndex
in interface PageControl
public void setRowsPerPage(int rowsPerPage)
setRowsPerPage
in interface PageControl
protected void rowsPerPageChanged()
public int getRowsPerPage()
getRowsPerPage
in interface PageControl
PageControl.DYNAMIC_ROW_COUNT
protected int getActualRowCount()
public abstract int getVisibleRowCount()
protected void handle(Throwable e)
Copyright © 2003–2021 XDEV Software. All rights reserved.