info.joseluismartin.gui
Class DefaultPaginator

java.lang.Object
  extended by info.joseluismartin.gui.DefaultPaginator
All Implemented Interfaces:
Paginator

public class DefaultPaginator
extends Object
implements Paginator

Default implementation of Paginator.

Author:
Jose Luis Martin - (jlm@joseluismartin.info)
See Also:
PaginatorView

Constructor Summary
DefaultPaginator()
           
 
Method Summary
 void addPaginatorListener(PaginatorListener listener)
          
 void firstPage()
          
 int getCount()
          
 int getPage()
           
 int getPageSize()
           
 int getStartIndex()
          
 int getTotalPages()
          
 int getTotalRecords()
           
 boolean hasNext()
          
 boolean hasPage(int indexPage)
          
 boolean hasPrevious()
          
 void lastPage()
          
 void nextPage()
          
 void previousPage()
          
 void removePaginatorListener(PaginatorListener listener)
          
 void setCount(int totalRecords)
           
 void setPage(int indexPage)
          
 void setPageSize(int pageSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPaginator

public DefaultPaginator()
Method Detail

getCount

public int getCount()

Specified by:
getCount in interface Paginator

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Paginator

hasPage

public boolean hasPage(int indexPage)

Specified by:
hasPage in interface Paginator

hasPrevious

public boolean hasPrevious()

Specified by:
hasPrevious in interface Paginator

setPage

public void setPage(int indexPage)

Specified by:
setPage in interface Paginator

getStartIndex

public int getStartIndex()

Specified by:
getStartIndex in interface Paginator

getTotalPages

public int getTotalPages()

Specified by:
getTotalPages in interface Paginator

addPaginatorListener

public void addPaginatorListener(PaginatorListener listener)

Specified by:
addPaginatorListener in interface Paginator

removePaginatorListener

public void removePaginatorListener(PaginatorListener listener)

Specified by:
removePaginatorListener in interface Paginator

getTotalRecords

public int getTotalRecords()
Returns:
the totalRecords

setCount

public void setCount(int totalRecords)
Specified by:
setCount in interface Paginator
Parameters:
totalRecords - the totalRecords to set

getPageSize

public int getPageSize()
Specified by:
getPageSize in interface Paginator
Returns:
the pageSize

setPageSize

public void setPageSize(int pageSize)
Specified by:
setPageSize in interface Paginator
Parameters:
pageSize - the pageSize to set

getPage

public int getPage()
Specified by:
getPage in interface Paginator
Returns:
the page

firstPage

public void firstPage()

Specified by:
firstPage in interface Paginator

lastPage

public void lastPage()

Specified by:
lastPage in interface Paginator

nextPage

public void nextPage()

Specified by:
nextPage in interface Paginator

previousPage

public void previousPage()

Specified by:
previousPage in interface Paginator


Copyright © 2013 JDAL. All Rights Reserved.