|
||||||||||
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.user.client.ui.ComplexPanel
com.google.gwt.widgetideas.table.client.ScrollTable
com.google.gwt.widgetideas.table.client.PagingScrollTable<R>
R
- the data type of the row valuespublic class PagingScrollTable<R>
A ScrollTable
that acts as a view for an underlying
TableModel
.
Nested Class Summary | |
---|---|
static interface |
PagingScrollTable.CellRenderer
The renderer used to set cell contents. |
Nested classes/interfaces inherited from class com.google.gwt.widgetideas.table.client.ScrollTable |
---|
ScrollTable.ResizePolicy, ScrollTable.ScrollPolicy, ScrollTable.ScrollTableImages |
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.ScrollTable |
---|
DEFAULT_STYLE_NAME |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
PagingScrollTable(TableModel<R> tableModel,
FixedWidthGrid dataTable,
FixedWidthFlexTable headerTable)
Constructor. |
|
PagingScrollTable(TableModel<R> tableModel,
FixedWidthGrid dataTable,
FixedWidthFlexTable headerTable,
ScrollTable.ScrollTableImages images)
Constructor. |
Method Summary | |
---|---|
void |
addRowPagingListener(RowPagingListener listener)
Add a new RowPagingListener . |
protected void |
editCell(int row,
int column)
Invoke the cell editor on a cell, if one is set. |
AbstractCellEditor<R> |
getCellEditor(int column)
Get the column editor for a column. |
protected AbstractCellEditor.Callback<R> |
getCellEditorCallback()
|
PagingScrollTable.CellRenderer |
getCellRenderer()
|
int |
getCurrentPage()
|
protected int |
getFirstRow()
Get the first visible row index. |
protected int |
getLastRow()
Get the last visible row index. |
int |
getNumPages()
|
int |
getPageSize()
|
R |
getRowValue(int row)
Get the value associated with a row. |
TableModel<R> |
getTableModel()
|
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. |
boolean |
hasCellEditor(int column)
Check whether a column has a cell editor. |
protected void |
insertAbsoluteRow(int beforeRow)
Insert a row into the table relative to the total number of rows. |
protected void |
onLoad()
This method is called immediately after a widget becomes attached to the browser's document. |
void |
reloadPage()
Reload the current page. |
protected void |
removeAbsoluteRow(int row)
Remove a row from the table relative to the total number of rows. |
void |
removeRowPagingListener(RowPagingListener listener)
Remove a RowPagingListener . |
protected void |
renderCell(int row,
int column,
java.lang.Object data)
Render the contents of the cell. |
protected void |
setAbsoluteData(int row,
int column,
java.lang.Object data)
Set the data in a cell. |
void |
setBulkRenderer(FixedWidthGridBulkRenderer bulkRenderer)
Set the bulk table renderer. |
void |
setCellEditor(int column,
AbstractCellEditor<R> editor)
Set the cell editor for a column. |
void |
setCellRenderer(PagingScrollTable.CellRenderer cellRenderer)
Set the PagingScrollTable.CellRenderer used to render cell contents. |
protected void |
setData(int firstRow,
java.util.Iterator<java.util.Iterator<java.lang.Object>> rows,
java.util.List<R> rowValues)
Set a block of data. |
void |
setPageSize(int pageSize)
Set the number of rows per page. |
void |
setRowValue(int row,
R value)
Associate a row in the table with a value. |
Methods inherited from class com.google.gwt.widgetideas.table.client.ScrollTable |
---|
autoFitColumnWidth, fillWidth, getCellPadding, getCellSpacing, getColumnWidth, getDataTable, getDataWrapper, getFooterTable, getHeaderTable, getMinWidth, getResizePolicy, getScrollPolicy, isAutoFitEnabled, isColumnSortable, isSortingEnabled, onAttach, onBrowserEvent, onResize, redraw, remove, resizeTablesVertically, resizeTablesVerticallyNow, scrollTables, setAutoFitEnabled, setCellPadding, setCellSpacing, setColumnSortable, setColumnWidth, setColumnWidth, setFooterTable, setHeight, setMinWidth, setResizePolicy, setScrollPolicy, setSortingEnabled |
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
---|
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, insert, insert, iterator, remove |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onUnload, orphan |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
getParent, isAttached, onDetach, removeFromParent, setElement |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.widgetideas.client.ResizableWidget |
---|
getElement, isAttached |
Constructor Detail |
---|
public PagingScrollTable(TableModel<R> tableModel, FixedWidthGrid dataTable, FixedWidthFlexTable headerTable)
tableModel
- the underlying table modeldataTable
- the table used to display dataheaderTable
- the header tablepublic PagingScrollTable(TableModel<R> tableModel, FixedWidthGrid dataTable, FixedWidthFlexTable headerTable, ScrollTable.ScrollTableImages images)
tableModel
- the underlying table modeldataTable
- the table used to display dataheaderTable
- the header tableimages
- the images to use in the tableMethod Detail |
---|
public void addRowPagingListener(RowPagingListener listener)
RowPagingListener
.
addRowPagingListener
in interface SourceRowPagingEvents
listener
- the listenerpublic AbstractCellEditor<R> getCellEditor(int column)
column
- the column index
public PagingScrollTable.CellRenderer getCellRenderer()
PagingScrollTable.CellRenderer
used to render cells.public int getCurrentPage()
public int getNumPages()
public int getPageSize()
public R getRowValue(int row)
row
- the row index
public TableModel<R> getTableModel()
public void gotoFirstPage()
public void gotoLastPage()
public void gotoNextPage()
public void gotoPage(int page, boolean forced)
page
- the pageforced
- reload the page even if it is already loadedpublic void gotoPreviousPage()
public boolean hasCellEditor(int column)
column
- the column index
public void reloadPage()
public void removeRowPagingListener(RowPagingListener listener)
RowPagingListener
.
removeRowPagingListener
in interface SourceRowPagingEvents
listener
- the listener to removepublic void setCellEditor(int column, AbstractCellEditor<R> editor)
column
- the column indexeditor
- the cell editorpublic void setCellRenderer(PagingScrollTable.CellRenderer cellRenderer)
PagingScrollTable.CellRenderer
used to render cell contents.
cellRenderer
- the new rendererpublic void setPageSize(int pageSize)
pageSize
- the number of rows per pagepublic void setRowValue(int row, R value)
row
- the row indexvalue
- the value to associatepublic void setBulkRenderer(FixedWidthGridBulkRenderer bulkRenderer)
bulkRenderer
- the table rendererprotected void editCell(int row, int column)
protected AbstractCellEditor.Callback<R> getCellEditorCallback()
protected int getFirstRow()
protected int getLastRow()
protected void insertAbsoluteRow(int beforeRow)
beforeRow
- the row indexprotected void onLoad()
onLoad
in class com.google.gwt.user.client.ui.Panel
protected void removeAbsoluteRow(int row)
row
- the row indexprotected void renderCell(int row, int column, java.lang.Object data)
row
- the row indexcolumn
- the column indexdata
- the data to renderprotected void setAbsoluteData(int row, int column, java.lang.Object data)
PagingScrollTable.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.
row
- the row indexcolumn
- the column indexdata
- the data to setprotected void setData(int firstRow, java.util.Iterator<java.util.Iterator<java.lang.Object>> rows, java.util.List<R> rowValues)
firstRow
- the row indexrows
- the 2D Iterator of datarowValues
- the values associated with each row
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |