|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.web.bean.PagerFilter<T>
@PublicApi public class PagerFilter<T>
This is a super class that implements paging for browsers.
Most other filters (which want paging ability) will extend this.
Field Summary | |
---|---|
protected Collection<Page> |
pages
Deprecated. since 4.0 use #getPages() rather than access pages directly |
Constructor Summary | |
---|---|
PagerFilter()
|
|
PagerFilter(int max)
|
|
PagerFilter(int start,
int max)
|
|
PagerFilter(PagerFilter old)
|
Method Summary | |
---|---|
List<Page> |
generatePages(Collection<T> items)
generates a collection of page objects which keep track of the pages for display |
List<T> |
getCurrentPage(List<T> itemsCol)
Gets the current page out of a list of objects. |
int |
getEnd()
|
int |
getMax()
|
int |
getNextStart()
|
protected Collection<Page> |
getPages()
|
List<Page> |
getPages(Collection<T> itemsCol)
|
int |
getPageSize()
|
int |
getPreviousStart()
|
int |
getStart()
|
static PagerFilter |
getUnlimitedFilter()
A pager that will return unlimited number of objects. |
static PagerFilter |
newPageAlignedFilter(int index,
int max)
A pager that has its start aligned to the page containing the index. |
List<Page> |
restrictPages(Collection<Page> pages,
int size)
Restrict the pagers to a certain number of pages on either side of the current page. |
void |
setMax(int max)
|
void |
setStart(int start)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Collection<Page> pages
Page
objects
Constructor Detail |
---|
public PagerFilter()
public PagerFilter(PagerFilter old)
public PagerFilter(int max)
public PagerFilter(int start, int max)
Method Detail |
---|
public static PagerFilter getUnlimitedFilter()
Integer.MAX_VALUE
public static PagerFilter newPageAlignedFilter(int index, int max)
index
- the index of a result whose page you want the pager to start atmax
- the maximum number of results in a page
IllegalArgumentException
- if index is less than 0public List<T> getCurrentPage(List<T> itemsCol)
public List<Page> getPages(Collection<T> itemsCol)
protected Collection<Page> getPages()
public List<Page> generatePages(Collection<T> items)
items
- public List<Page> restrictPages(Collection<Page> pages, int size)
PAGES_TO_LIST
.
public int getMax()
public int getPageSize()
public void setMax(int max)
public int getStart()
public void setStart(int start)
public int getEnd()
public int getNextStart()
public int getPreviousStart()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |