|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.action.util.Page
public class Page
A class to represent a page in a paginator. Each page knows it's ordinal number in the list and its starting index of the items we're paginating.
This class is useful when showing a list of links to pages in a forum or thread:
Field Summary | |
---|---|
static Page |
FIRST
|
Constructor Summary | |
---|---|
Page()
Default constructor - does nothing. |
Method Summary | |
---|---|
static Page |
getNext(Page page,
int range)
Returns a page with correct values to the page next to the given page. |
int |
getNumber()
Returns the display number (ordinal number) of this page. |
static Page |
getPrev(Page page,
int range)
Returns a page with correct values to the page previous to the given page. |
int |
getStart()
Sets the starting index of the items we're paginating. |
void |
setNumber(int number)
Sets the display number (ordinal number) of this page. |
void |
setStart(int start)
Sets the starting index of the items we're paginating. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Page FIRST
Constructor Detail |
---|
public Page()
Method Detail |
---|
public int getNumber()
public void setNumber(int number)
number
- the display number of this page.public int getStart()
public void setStart(int start)
start
- the starting ndex of the items we're paginating.public static Page getPrev(Page page, int range)
page
- the current page used to compute the previous page.range
- the number of items per page - used to compute the correct previous item index.
public static Page getNext(Page page, int range)
page
- the current page used to compute the next page.range
- the number of items per page - used to compute the correct next item index.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |