|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.widgetideas.table.client.overrides.HTMLTable
com.google.gwt.widgetideas.table.client.overrides.Grid
com.google.gwt.widgetideas.table.client.SelectionGrid
com.google.gwt.widgetideas.table.client.FixedWidthGrid
com.google.gwt.widgetideas.table.client.SortableFixedWidthGrid
com.google.gwt.widgetideas.table.client.PagingGrid
public class PagingGrid
A PagingGrid
responds to events from an underlying
TableController
.
Nested Class Summary | |
---|---|
static interface |
PagingGrid.CellRenderer
The renderer used to set cell contents. |
Nested classes/interfaces inherited from class com.google.gwt.widgetideas.table.client.SortableFixedWidthGrid |
---|
SortableFixedWidthGrid.ColumnSorter, SortableFixedWidthGrid.ColumnSorterCallback |
Nested classes/interfaces inherited from class com.google.gwt.widgetideas.table.client.FixedWidthGrid |
---|
FixedWidthGrid.FixedWidthGridCellFormatter, FixedWidthGrid.FixedWidthGridColumnFormatter, FixedWidthGrid.FixedWidthGridRowFormatter |
Nested classes/interfaces inherited from class com.google.gwt.widgetideas.table.client.SelectionGrid |
---|
SelectionGrid.SelectedGridRowFormatter |
Nested classes/interfaces inherited from class com.google.gwt.widgetideas.table.client.overrides.HTMLTable |
---|
HTMLTable.CellFormatter, HTMLTable.ColumnFormatter, HTMLTable.RowFormatter |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.google.gwt.widgetideas.table.client.FixedWidthGrid |
---|
DEFAULT_COLUMN_WIDTH, MIN_COLUMN_WIDTH |
Fields inherited from class com.google.gwt.widgetideas.table.client.SelectionGrid |
---|
HOVERING_POLICY_CELL, HOVERING_POLICY_DISABLED, HOVERING_POLICY_ROW, SELECTION_POLICY_DISABLED, SELECTION_POLICY_MULTI_ROW, SELECTION_POLICY_ONE_ROW |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
PagingGrid(TableController tableController)
Constructor. |
|
PagingGrid(TableModel tableModel)
Constructor. |
Method Summary | |
---|---|
void |
addRowPagingListener(RowPagingListener listener)
Add a new RowPagingListener . |
void |
addTableDataRequestListener(TableDataRequestListener listener)
Add a new TableDataRequestListener . |
PagingGrid.CellRenderer |
getCellRenderer()
|
int |
getCurrentPage()
|
int |
getNumPages()
Get the number of pages. |
int |
getNumRows()
|
int |
getPageSize()
Get the number of rows per page. |
java.lang.Object |
getRowValue(int row)
Get the value associated with a row. |
void |
gotoFirstPage()
Go to the first page. |
void |
gotoLastPage()
Go to the last page. |
void |
gotoNextPage()
Go to the next page. |
void |
gotoPage(int page,
boolean forced)
Set the current page. |
void |
gotoPreviousPage()
Go to the previous page. |
void |
insertAbsoluteRow(int beforeRow,
int numRows)
Insert a row into the table relative to the total number of rows. |
void |
reloadPage()
Reload the current page. |
void |
removeAbsoluteRow(int row,
int numRows)
Remove a row from the table relative to the total number of rows. |
void |
removeRowPagingListener(RowPagingListener listener)
Remove a RowPagingListener . |
void |
removeTableDataRequestListener(TableDataRequestListener listener)
Remove a TableDataRequestListener . |
void |
setCellRenderer(PagingGrid.CellRenderer cellRenderer)
Set the PagingGrid.CellRenderer used to render cell contents. |
void |
setData(int row,
int column,
java.lang.Object data)
Set the data in a cell. |
void |
setData(int firstRow,
java.util.Iterator rows,
java.util.List rowValues)
Set a block of data. |
void |
setNumRows(int numRows)
Set the number of rows in the underlying data. |
void |
setPageSize(int pageSize)
Set the number of rows per page. |
void |
setPagingFailure(java.lang.Throwable caught)
Set the failure condition associated with a page request. |
void |
setRowValue(int row,
java.lang.Object value)
Associate a row in the table with a value. |
void |
sortColumn(int column,
boolean ascending)
Sort the grid according to the specified column. |
Methods inherited from class com.google.gwt.widgetideas.table.client.SortableFixedWidthGrid |
---|
addSortableColumnsListener, getColumnSorter, getColumnSortList, moveRowDown, moveRowUp, removeSortableColumnsListener, reverseRows, setColumnSorter, sortColumn, swapRows |
Methods inherited from class com.google.gwt.widgetideas.table.client.FixedWidthGrid |
---|
autoFitColumnWidth, getAutoFitColumnWidth, getColumnWidth, getDefaultColumnWidth, insertRow, removeRow, resizeColumns, resizeRows, setColumnWidth |
Methods inherited from class com.google.gwt.widgetideas.table.client.SelectionGrid |
---|
addTableSelectionListener, deselectRow, deselectRows, getHoveringPolicy, getMinHoverRow, getSelectedRows, getSelectionPolicy, isRowSelected, onBrowserEvent, onCellClicked, removeTableSelectionListener, selectRow, selectRow, setHoveringPolicy, setMinHoverRow, setSelectionPolicy |
Methods inherited from class com.google.gwt.widgetideas.table.client.overrides.Grid |
---|
getCellCount, getColumnCount, getRowCount, resize |
Methods inherited from class com.google.gwt.widgetideas.table.client.overrides.HTMLTable |
---|
addTableListener, clear, clearAll, clearCell, getCellFormatter, getCellPadding, getCellSpacing, getColumnFormatter, getEventTargetCell, getHTML, getRowFormatter, getText, getWidget, isCellPresent, iterator, remove, removeTableListener, setBorderWidth, setCellPadding, setCellSpacing, setElement, setHTML, setText, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
add |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
getParent, isAttached, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 |
Constructor Detail |
---|
public PagingGrid(TableController tableController)
tableController
- the underlying TableController
public PagingGrid(TableModel tableModel)
tableModel
- the TableModel
used to retrieve dataMethod Detail |
---|
public void addRowPagingListener(RowPagingListener listener)
RowPagingListener
.
addRowPagingListener
in interface SourceRowPagingEvents
listener
- the listenerpublic void addTableDataRequestListener(TableDataRequestListener listener)
TableDataRequestListener
.
addTableDataRequestListener
in interface SourceTableDataRequestEvents
listener
- the listenerpublic PagingGrid.CellRenderer getCellRenderer()
PagingGrid.CellRenderer
used to render cells.public int getCurrentPage()
getCurrentPage
in interface HasRowPaging
public int getNumPages()
HasRowPaging
getNumPages
in interface HasRowPaging
public int getNumRows()
public int getPageSize()
HasRowPaging
getPageSize
in interface HasRowPaging
public java.lang.Object getRowValue(int row)
row
- the row index
public void gotoFirstPage()
gotoFirstPage
in interface HasRowPaging
public void gotoLastPage()
gotoLastPage
in interface HasRowPaging
public void gotoNextPage()
public void gotoPage(int page, boolean forced)
gotoPage
in interface HasRowPaging
page
- the pageforced
- reload the page even if it is already loadedpublic void gotoPreviousPage()
public void insertAbsoluteRow(int beforeRow, int numRows)
insertAbsoluteRow
in interface ControllableTable
beforeRow
- the row indexnumRows
- the new number of rowspublic void reloadPage()
public void removeAbsoluteRow(int row, int numRows)
removeAbsoluteRow
in interface ControllableTable
row
- the row indexnumRows
- the new number of rowspublic void removeRowPagingListener(RowPagingListener listener)
RowPagingListener
.
removeRowPagingListener
in interface SourceRowPagingEvents
listener
- the listener to removepublic void removeTableDataRequestListener(TableDataRequestListener listener)
TableDataRequestListener
.
removeTableDataRequestListener
in interface SourceTableDataRequestEvents
listener
- the listener to removepublic void setCellRenderer(PagingGrid.CellRenderer cellRenderer)
PagingGrid.CellRenderer
used to render cell contents.
cellRenderer
- the new rendererpublic void setData(int row, int column, java.lang.Object data)
PagingGrid.CellRenderer
, if one is specified.
The row index in this method is relative to the total number of rows across
all pages. It is not the same as the row index passed into setHTML, which
is relative to the current page.
setData
in interface ControllableTable
row
- the row indexcolumn
- the column indexdata
- the data to setpublic void setData(int firstRow, java.util.Iterator rows, java.util.List rowValues)
setData
in interface ControllableTable
firstRow
- the row indexrows
- the 2D Iterator of datarowValues
- the values associated with each rowpublic void setNumRows(int numRows)
setNumRows
in interface ControllableTable
numRows
- the new number of rowspublic void setPageSize(int pageSize)
setPageSize
in interface HasRowPaging
pageSize
- the number of rows per pagepublic void setPagingFailure(java.lang.Throwable caught)
ControllableTable
setPagingFailure
in interface ControllableTable
caught
- the exception that led to the failureControllableTable.setPagingFailure(java.lang.Throwable)
public void setRowValue(int row, java.lang.Object value)
row
- the row indexvalue
- the value to associatepublic void sortColumn(int column, boolean ascending)
SortableFixedWidthGrid
, the PagingGrid
does not automatically sort columns using a client side quick sort.
Instead, PagingGrid
sets the sorted column and reloads the page,
allowing the user to move sorting to the server side.
Setting a column sorter manually will override this behavior.
sortColumn
in class SortableFixedWidthGrid
column
- the column to sortascending
- reverse sort the column
java.lang.IndexOutOfBoundsException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |