| java.lang.Object org.sakaiproject.javax.PagingPosition
PagingPosition | public class PagingPosition implements Cloneable(Code) | |
PagingPosition models a current position in a paging display, with a first and last item value, 1 based.
Implementation note: the default Object.equals() is fine for this class.
|
Field Summary | |
protected int | m_first The first item position on the current page, 1 based. | protected int | m_last The last item position on the current page, 1 based. | protected boolean | m_paging If true, paging is ebabled, otherwise all items should be used. |
Constructor Summary | |
public | PagingPosition() Construct, setting position to select all possible items. | public | PagingPosition(int first, int last) Construct, setting the first and last. |
Method Summary | |
public void | adjustPostition(int distance) Adjust the first and list item position by distance, positive or negative. | public Object | clone() | public int | getFirst() Access the first item position, 1 based. | public int | getLast() Access the last item position, 1 based. | public boolean | isPaging() Check if we have paging enabled. | public void | setPaging(boolean paging) Set the paging enabled value. | public void | setPosition(int first, int last) Set the first and last positions. | protected void | validate() Adjust the first and last to be valid. | public void | validate(int biggestLast) |
m_first | protected int m_first(Code) | | The first item position on the current page, 1 based.
|
m_last | protected int m_last(Code) | | The last item position on the current page, 1 based.
|
m_paging | protected boolean m_paging(Code) | | If true, paging is ebabled, otherwise all items should be used.
|
PagingPosition | public PagingPosition()(Code) | | Construct, setting position to select all possible items.
|
PagingPosition | public PagingPosition(int first, int last)(Code) | | Construct, setting the first and last.
Parameters: first - The first item position, 1 based. Parameters: last - The last item position, 1 based. |
adjustPostition | public void adjustPostition(int distance)(Code) | | Adjust the first and list item position by distance, positive or negative.
Parameters: distance - The positive or negative distance to move the first and last item positions. |
getFirst | public int getFirst()(Code) | | Access the first item position, 1 based.
the first item position, 1 based. |
getLast | public int getLast()(Code) | | Access the last item position, 1 based.
the last item position, 1 based. |
isPaging | public boolean isPaging()(Code) | | Check if we have paging enabled.
true if paging is enabled, false if not. |
setPaging | public void setPaging(boolean paging)(Code) | | Set the paging enabled value.
Parameters: paging - the new paging enabled value. |
setPosition | public void setPosition(int first, int last)(Code) | | Set the first and last positions.
Parameters: first - The new first item position, 1 based. Parameters: last - The new last item position, 1 based. |
validate | protected void validate()(Code) | | Adjust the first and last to be valid.
|
validate | public void validate(int biggestLast)(Code) | | Adjust the first and last to be valid and within the range 1..biggestLast
Parameters: biggestLast - The largest valid value for last |
|
|