public class Paginator extends Object implements IPaginator
IPaginator.IPagingListener, IPaginator.PagingEventType| Constructor and Description |
|---|
Paginator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEventListener(IPaginator.IPagingListener listener)
Register a listener to receive events when a setting changes.
|
int |
getCurrentPage()
Returns the index of the current page.
|
int |
getMaxPage()
Returns the index of the last page.
|
int |
getModelOffset(int pageIndex)
Returns the index of the first model element on the specified page.
|
int |
getModelSize()
Returns the size of the model.
|
int |
getPageSize()
Returns the number of model objects in a single page.
|
boolean |
inRange(int modelIndex)
Returns true if the model index falls within the current page.
|
void |
removeAllListeners()
Removes all listeners.
|
boolean |
removeEventListener(IPaginator.IPagingListener listener)
Removes a single event listener.
|
void |
setCurrentPage(int pageIndex)
Sets the index of the current page.
|
void |
setModelSize(int modelSize)
Sets the number of elements in the underlying model.
|
void |
setPageSize(int pageSize)
Sets the number of model objects in a single page.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasNext, hasPrevious, isDisabledpublic int getPageSize()
IPaginatorgetPageSize in interface IPaginatorIPaginator.getPageSize()public void setPageSize(int pageSize)
IPaginatorsetPageSize in interface IPaginatorpageSize - The page size.IPaginator.setPageSize(int)public int getCurrentPage()
IPaginatorgetCurrentPage in interface IPaginatorIPaginator.getCurrentPage()public void setCurrentPage(int pageIndex)
IPaginatorsetCurrentPage in interface IPaginatorpageIndex - Index of the page to become the current page.IPaginator.setCurrentPage(int)public int getModelSize()
IPaginatorgetModelSize in interface IPaginatorIPaginator.getModelSize()public void setModelSize(int modelSize)
modelSize - Number of elements in the underlying model.public int getMaxPage()
IPaginatorgetMaxPage in interface IPaginatorIPaginator.getMaxPage()public boolean inRange(int modelIndex)
modelIndex - The model index.public int getModelOffset(int pageIndex)
pageIndex - The page index.public boolean addEventListener(IPaginator.IPagingListener listener)
IPaginatoraddEventListener in interface IPaginatorlistener - The listener to add.IPaginator.addEventListener(org.fujion.model.IPaginator.IPagingListener)public void removeAllListeners()
IPaginatorremoveAllListeners in interface IPaginatorIPaginator.removeAllListeners()public boolean removeEventListener(IPaginator.IPagingListener listener)
IPaginatorremoveEventListener in interface IPaginatorlistener - The listener to remove.IPaginator.removeEventListener(org.fujion.model.IPaginator.IPagingListener)Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.