com.atlassian.jira.web.bean
Class PagerFilter

java.lang.Object
  extended bycom.atlassian.jira.web.bean.PagerFilter
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GroupBrowserFilter, UserBrowserFilter, UserPickerFilter

public class PagerFilter
extends java.lang.Object
implements java.io.Serializable

This is a super class that implements paging for browsers.

Most other filters (which want paging ability) will extend this.

See Also:
Serialized Form

Field Summary
(package private)  int max
           
protected  java.util.Collection pages
          A collection of Page objects
(package private)  int start
           
 
Constructor Summary
PagerFilter()
           
 
Method Summary
protected  java.util.Collection generatePages(java.util.Collection items)
          generates a collection of page objects which keep track of the pages for display
 java.util.Collection getCurrentPage(java.util.Collection itemsCol)
          Get the current page out of a list of items - won't work well on any collection that isn't a list
 int getEnd()
           
 int getMax()
           
 int getNextStart()
           
 java.util.Collection getPages(java.util.Collection itemsCol)
           
 int getPreviousStart()
           
 int getStart()
           
protected  java.util.Collection restrictPages(java.util.Collection 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

max

int max

start

int start

pages

protected java.util.Collection pages
A collection of Page objects

Constructor Detail

PagerFilter

public PagerFilter()
Method Detail

getCurrentPage

public java.util.Collection getCurrentPage(java.util.Collection itemsCol)
Get the current page out of a list of items - won't work well on any collection that isn't a list

Returns:
a list of items

getPages

public java.util.Collection getPages(java.util.Collection itemsCol)

generatePages

protected java.util.Collection generatePages(java.util.Collection items)
generates a collection of page objects which keep track of the pages for display

Parameters:
items -
Returns:

restrictPages

protected java.util.Collection restrictPages(java.util.Collection pages,
                                             int size)
Restrict the pagers to a certain number of pages on either side of the current page.

The number of pages to list is stored in #PAGES_TO_LIST.


getMax

public int getMax()

setMax

public void setMax(int max)

getStart

public int getStart()

setStart

public void setStart(int start)

getEnd

public int getEnd()

getNextStart

public int getNextStart()

getPreviousStart

public int getPreviousStart()


Copyright © 2002-2005 Atlassian. All Rights Reserved.