JIDE 3.5.15

com.jidesoft.paging
Interface PageNavigationSupport

All Known Implementing Classes:
AbstractPageListModel, AbstractPageNavigationSupport, AbstractPageTableModel, AdvancePageTableModel, DefaultPageListModel, DefaultPageTableModel, HibernatePageTableModel

public interface PageNavigationSupport

PageNavigationSupport is an interface to support paging on a table model or a list model. It has methods to get/set the page size, the current page index, the total row count and methods to navigate the pages. It also supports PageNavigationListener which will tell you when the current page index changes, the page size changes or total page count changes.


Method Summary
 void addPageNavigationListener(PageNavigationListener l)
          Adds a PageNavigationListener so that it will be notified when the page size changes, the current page index changes or total page count changes.
 void firePageNavigationEvent(Object source, int id, int oldValue, int newValue)
          Fires the PageNavigationEvent to all the PageNavigationListeners .
 void firstPage()
          Navigates to the first page.
 int getCurrentPage()
          Gets the current page.
 int getPageCount()
          Gets the total page count.
 PageNavigationListener[] getPageNavigationListeners()
          Gets all the PageNavigationListeners that were added before.
 int getPageSize()
          Gets the page size.
 int getTotalRecordCount()
          Gets the total record/row count.
 void lastPage()
          Navigates to the last page.
 void nextPage()
          Navigates to the next page.
 void previousPage()
          Navigates to the previous page.
 void removePageNavigationListener(PageNavigationListener l)
          Removes PageNavigationListener that was added before.
 void setCurrentPage(int page)
          Sets the current page.
 void setPageSize(int pageSize)
          Sets the page size.
 void setTotalRecordCount(int totalRecordCount)
          Sets the total record/row count.
 

Method Detail

getPageSize

int getPageSize()
Gets the page size.

Returns:
the page size.

setPageSize

void setPageSize(int pageSize)
Sets the page size.

Parameters:
pageSize - the new page size.

getCurrentPage

int getCurrentPage()
Gets the current page.

Returns:
the current page.

setCurrentPage

void setCurrentPage(int page)
Sets the current page.

Parameters:
page - the new current page.

getPageCount

int getPageCount()
Gets the total page count.

Returns:
the total page count.

getTotalRecordCount

int getTotalRecordCount()
Gets the total record/row count.

Returns:
the total record/row count.

setTotalRecordCount

void setTotalRecordCount(int totalRecordCount)
Sets the total record/row count.

Parameters:
totalRecordCount - the new total row count.

nextPage

void nextPage()
Navigates to the next page.


previousPage

void previousPage()
Navigates to the previous page.


firstPage

void firstPage()
Navigates to the first page.


lastPage

void lastPage()
Navigates to the last page.


addPageNavigationListener

void addPageNavigationListener(PageNavigationListener l)
Adds a PageNavigationListener so that it will be notified when the page size changes, the current page index changes or total page count changes.

Parameters:
l - a PageNavigationListener

removePageNavigationListener

void removePageNavigationListener(PageNavigationListener l)
Removes PageNavigationListener that was added before.

Parameters:
l - an existing PageNavigationListener.

getPageNavigationListeners

PageNavigationListener[] getPageNavigationListeners()
Gets all the PageNavigationListeners that were added before.

Returns:
all the PageNavigationListeners.

firePageNavigationEvent

void firePageNavigationEvent(Object source,
                             int id,
                             int oldValue,
                             int newValue)
Fires the PageNavigationEvent to all the PageNavigationListeners .

Parameters:
source - the source of the event.
id - the event type. It could be PageNavigationEvent.PAGE_COUNT_CHANGED, PageNavigationEvent.PAGE_SIZE_CHANGED, or PageNavigationEvent.CURRENT_PAGE_CHANGED.
oldValue - the old value. It could be the old page count, the old page size or the old current page index, depending on the value of the id parameter.
newValue - the new value. It could be the new page count, the new page size or the new current page index, depending on the value of the id parameter.

JIDE 3.5.15