org.chorem.pollen.ui.components
Class Pager

java.lang.Object
  extended by org.chorem.pollen.ui.components.Pager

public class Pager
extends Object

Pager Created: 8 mars 2010

Version:
$Revision: 2923 $ Mise a jour: $Date: 2010-03-10 10:39:32 +0100 (mer., 10 mars 2010) $ par : $Author$
Author:
fdesbois

Constructor Summary
Pager()
           
 
Method Summary
 int getEndIndex()
          Get the end index of the range shown.
 int getFirstPage()
           
protected  int getFirstValue()
           
 int getLastPage()
           
protected  int getLastValue()
           
 int getStartIndex()
          Get the start index of the range shown.
 boolean hasNext()
          Test if there is next elements after this actual range.
 boolean hasPrevious()
          Test if there is previous elements before this actual range.
protected  void writeLink(org.apache.tapestry5.MarkupWriter writer, int index, String text, String style)
          Use an action event to change the current page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pager

public Pager()
Method Detail

writeLink

protected void writeLink(org.apache.tapestry5.MarkupWriter writer,
                         int index,
                         String text,
                         String style)
Use an action event to change the current page. The link refresh the entire page, no zone is managed yet.

Parameters:
writer - used to write a element
index - new page to change (argument of onAction method)
text - to write inside the a tag
style - of the css (class) for the a tag

getStartIndex

public int getStartIndex()
Get the start index of the range shown.

Returns:
the start index for elements to show

getEndIndex

public int getEndIndex()
Get the end index of the range shown.

Returns:
the end index for elements to show

getFirstValue

protected int getFirstValue()

getLastValue

protected int getLastValue()

hasPrevious

public boolean hasPrevious()
Test if there is previous elements before this actual range.

Returns:
true if there is previous elements, false otherwise

hasNext

public boolean hasNext()
Test if there is next elements after this actual range.

Returns:
true if there is next elements, false otherwise

getFirstPage

public int getFirstPage()

getLastPage

public int getLastPage()


Copyright © 2009-2010 CodeLutin. All Rights Reserved.