com.google.gwt.widgetideas.table.client
Interface HasRowPaging

All Superinterfaces:
HasFixedColumnWidth, HasTableCells, SourceRowPagingEvents
All Known Implementing Classes:
EditablePagingGrid, PagingGrid

public interface HasRowPaging
extends SourceRowPagingEvents, HasFixedColumnWidth

An interface for tables that can do paging.


Method Summary
 int getCurrentPage()
           
 int getNumPages()
          Get the number of pages.
 int getPageSize()
          Get the number of rows per page.
 void gotoFirstPage()
          Go to the first page.
 void gotoLastPage()
          Go to the last page.
 void gotoPage(int page, boolean forced)
          Set the current page.
 void setPageSize(int pageSize)
          Set the number of rows per page.
 
Methods inherited from interface com.google.gwt.widgetideas.table.client.SourceRowPagingEvents
addRowPagingListener, removeRowPagingListener
 
Methods inherited from interface com.google.gwt.widgetideas.table.client.HasFixedColumnWidth
getColumnCount, getColumnWidth, getDefaultColumnWidth, setColumnWidth
 
Methods inherited from interface com.google.gwt.widgetideas.table.client.HasTableCells
getCellCount, getCellPadding, getCellSpacing, getEventTargetCell, setCellPadding, setCellSpacing
 

Method Detail

getCurrentPage

int getCurrentPage()
Returns:
the current page

getNumPages

int getNumPages()
Get the number of pages. If the number of pages is unknown, -1 is returned.

Returns:
the page count

getPageSize

int getPageSize()
Get the number of rows per page.

Returns:
the number of rows per page

gotoFirstPage

void gotoFirstPage()
Go to the first page.


gotoLastPage

void gotoLastPage()
Go to the last page.


gotoPage

void gotoPage(int page,
              boolean forced)
Set the current page. If the page is out of bounds, it will be automatically set to zero or the last page without throwing any errors.

Parameters:
page - the page
forced - reload the page even if it is already loaded

setPageSize

void setPageSize(int pageSize)
Set the number of rows per page. By default, the page size is zero, which indicates that all rows should be shown on the page.

Parameters:
pageSize - the number of rows per page