JIDE 3.5.15

com.jidesoft.list
Class AbstractPageListModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by com.jidesoft.list.AbstractPageListModel
All Implemented Interfaces:
PageNavigationSupport, Serializable, EventListener, ListDataListener, ListModel
Direct Known Subclasses:
DefaultPageListModel

public abstract class AbstractPageListModel
extends AbstractListModel
implements PageNavigationSupport, ListDataListener

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
AbstractPageListModel()
           
AbstractPageListModel(int pageSize)
           
 
Method Summary
 void addPageNavigationListener(PageNavigationListener l)
          Adds a PageNavigationListener to the page.
 void contentsChanged(ListDataEvent e)
           
 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.
 int getSize()
           
 void intervalAdded(ListDataEvent e)
           
 void intervalRemoved(ListDataEvent e)
           
 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 javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
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
 
Methods inherited from interface javax.swing.ListModel
getElementAt
 

Constructor Detail

AbstractPageListModel

public AbstractPageListModel()

AbstractPageListModel

public AbstractPageListModel(int pageSize)
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.

getSize

public int getSize()
Specified by:
getSize in interface ListModel

intervalAdded

public void intervalAdded(ListDataEvent e)
Specified by:
intervalAdded in interface ListDataListener

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Specified by:
intervalRemoved in interface ListDataListener

contentsChanged

public void contentsChanged(ListDataEvent e)
Specified by:
contentsChanged in interface ListDataListener

JIDE 3.5.15