|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gvsig.tools.paging.DefaultPagingCalculator
public class DefaultPagingCalculator
Default PagingCalculator
implementation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.gvsig.tools.paging.PagingCalculator |
---|
PagingCalculator.Sizeable |
Field Summary |
---|
Fields inherited from interface org.gvsig.tools.paging.PagingCalculator |
---|
DEFAULT_PAGE_SIZE |
Constructor Summary | |
---|---|
DefaultPagingCalculator(PagingCalculator.Sizeable sizeable)
Creates a new DefaultPagingCalculator , with the default page
size (PagingCalculator.DEFAULT_PAGE_SIZE ), setting the current
page to the first one. |
|
DefaultPagingCalculator(PagingCalculator.Sizeable sizeable,
int maxPageSize)
Creates a new DefaultPagingCalculator , setting the current page
to the first one. |
|
DefaultPagingCalculator(PagingCalculator.Sizeable sizeable,
int maxPageSize,
long currentPage)
Creates a new DefaultPagingCalculator . |
Method Summary | |
---|---|
long |
getCurrentPage()
Returns the number of the currently loaded page of data (zero based). |
int |
getCurrentPageSize()
Returns the number of elements of the current page. |
long |
getInitialIndex()
Returns the index of the initial element of the current page into all the elements. |
protected long |
getLastIndex()
|
int |
getMaxPageSize()
Returns the current maximum number of values per page. |
long |
getNumPages()
Returns the number of pages available, calculated with the total number of elements and the maximum number of elements per page. |
long |
getTotalSize()
Returns the number of elements of the entire set of data. |
void |
setCurrentPage(long currentPage)
Sets the current page number (zero based), and loads the elements for that page. |
void |
setMaxPageSize(int maxPageSize)
Sets the current maximum number of elements per page. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPagingCalculator(PagingCalculator.Sizeable sizeable)
DefaultPagingCalculator
, with the default page
size (PagingCalculator.DEFAULT_PAGE_SIZE
), setting the current
page to the first one.
public DefaultPagingCalculator(PagingCalculator.Sizeable sizeable, int maxPageSize)
DefaultPagingCalculator
, setting the current page
to the first one.
maxPageSize
- the maximum page sizepublic DefaultPagingCalculator(PagingCalculator.Sizeable sizeable, int maxPageSize, long currentPage)
DefaultPagingCalculator
.
maxPageSize
- the maximum page sizecurrentPage
- the current pageMethod Detail |
---|
public int getMaxPageSize()
PagingCalculator
getMaxPageSize
in interface PagingCalculator
public void setMaxPageSize(int maxPageSize)
PagingCalculator
setMaxPageSize
in interface PagingCalculator
maxPageSize
- the maximum number of values per pagepublic long getCurrentPage()
PagingCalculator
getCurrentPage
in interface PagingCalculator
public void setCurrentPage(long currentPage)
PagingCalculator
setCurrentPage
in interface PagingCalculator
currentPage
- the page to loadpublic long getInitialIndex()
PagingCalculator
getInitialIndex
in interface PagingCalculator
protected long getLastIndex()
public long getNumPages()
PagingCalculator
getNumPages
in interface PagingCalculator
public int getCurrentPageSize()
PagingCalculator
getCurrentPageSize
in interface PagingCalculator
public long getTotalSize()
PagingCalculator
getTotalSize
in interface PagingCalculator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |