JIDE 3.5.15

com.jidesoft.paging
Class AbstractPageNavigationSupport

java.lang.Object
  extended by com.jidesoft.paging.AbstractPageNavigationSupport
All Implemented Interfaces:
PageNavigationSupport

public abstract class AbstractPageNavigationSupport
extends Object
implements PageNavigationSupport

AbstractPageNavigationSupport is an abstract implementation of PageNavigationSupport. It implements almost all the interface methods except getTotalRecordCount and setTotalRecordCount.


Constructor Summary
AbstractPageNavigationSupport(EventListenerList listenerList)
           
AbstractPageNavigationSupport(int pageSize, EventListenerList listenerList)
           
 
Method Summary
 void addPageNavigationListener(PageNavigationListener l)
          Adds a PageNavigationListener to the page.
 void firePageNavigationEvent(Object source, int id, int oldValue, int newValue)
          Runs each PageNavigationListener's PageNavigationEventFired method.
 void firstPage()
          Navigates to the first page.
 int getCurrentPage()
          Gets the current page.
 int getPageCount()
          Gets the total page count.
 PageNavigationListener[] getPageNavigationListeners()
          Returns an array of all the PageNavigationListeners added to this Page with addPageNavigationListener .
 int getPageSize()
          Gets the page size.
 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 a PageNavigationListener from the page.
 void setCurrentPage(int page)
          Sets the current page.
protected  void setPageCount(int pageCount)
           
 void setPageSize(int pageSize)
          Sets the page size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.paging.PageNavigationSupport
getTotalRecordCount, setTotalRecordCount
 

Constructor Detail

AbstractPageNavigationSupport

public AbstractPageNavigationSupport(EventListenerList listenerList)

AbstractPageNavigationSupport

public AbstractPageNavigationSupport(int pageSize,
                                     EventListenerList listenerList)
Method Detail

getPageSize

public int getPageSize()
Description copied from interface: PageNavigationSupport
Gets the page size.

Specified by:
getPageSize in interface PageNavigationSupport
Returns:
the page size.

setPageSize

public void setPageSize(int pageSize)
Description copied from interface: PageNavigationSupport
Sets the page size.

Specified by:
setPageSize in interface PageNavigationSupport
Parameters:
pageSize - the new page size.

getCurrentPage

public int getCurrentPage()
Description copied from interface: PageNavigationSupport
Gets the current page.

Specified by:
getCurrentPage in interface PageNavigationSupport
Returns:
the current page.

setCurrentPage

public void setCurrentPage(int page)
Description copied from interface: PageNavigationSupport
Sets the current page.

Specified by:
setCurrentPage in interface PageNavigationSupport
Parameters:
page - the new current page.

setPageCount

protected void setPageCount(int pageCount)

getPageCount

public int getPageCount()
Description copied from interface: PageNavigationSupport
Gets the total page count.

Specified by:
getPageCount in interface PageNavigationSupport
Returns:
the total page count.

nextPage

public void nextPage()
Description copied from interface: PageNavigationSupport
Navigates to the next page.

Specified by:
nextPage in interface PageNavigationSupport

previousPage

public void previousPage()
Description copied from interface: PageNavigationSupport
Navigates to the previous page.

Specified by:
previousPage in interface PageNavigationSupport

firstPage

public void firstPage()
Description copied from interface: PageNavigationSupport
Navigates to the first page.

Specified by:
firstPage in interface PageNavigationSupport

lastPage

public void lastPage()
Description copied from interface: PageNavigationSupport
Navigates to the last page.

Specified by:
lastPage in interface PageNavigationSupport

addPageNavigationListener

public void addPageNavigationListener(PageNavigationListener l)
Adds a PageNavigationListener to the page.

Specified by:
addPageNavigationListener in interface PageNavigationSupport
Parameters:
l - the PageNavigationListener to be added

removePageNavigationListener

public void removePageNavigationListener(PageNavigationListener l)
Removes a PageNavigationListener from the page.

Specified by:
removePageNavigationListener in interface PageNavigationSupport
Parameters:
l - the PageNavigationListener to be removed

getPageNavigationListeners

public PageNavigationListener[] getPageNavigationListeners()
Returns an array of all the PageNavigationListeners added to this Page with addPageNavigationListener .

Specified by:
getPageNavigationListeners in interface PageNavigationSupport
Returns:
all of the PageNavigationListeners added, or an empty array if no listeners have been added

firePageNavigationEvent

public void firePageNavigationEvent(Object source,
                                    int id,
                                    int oldValue,
                                    int newValue)
Runs each PageNavigationListener's PageNavigationEventFired method.

Specified by:
firePageNavigationEvent in interface PageNavigationSupport
Parameters:
source - of this event
id - event id.
oldValue - the old value associated with this event.
newValue - the new value associated with this event.

JIDE 3.5.15