|
||||||||||
| 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.cellview.client.CellTable<T>
T - the data type of each rowpublic class CellTable<T>
A list view that supports paging and columns.
| Nested Class Summary | |
|---|---|
static interface |
CellTable.CleanResources
A cleaner version of the table that uses less graphics. |
static interface |
CellTable.CleanStyle
A cleaner version of the table that uses less graphics. |
static interface |
CellTable.Resources
A ClientBundle that provides images for this widget. |
static interface |
CellTable.Style
Styles used by this widget. |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Nested classes/interfaces inherited from interface com.google.gwt.view.client.PagingListView |
|---|
PagingListView.Pager<T> |
| Nested classes/interfaces inherited from interface com.google.gwt.view.client.ListView |
|---|
ListView.Delegate<T> |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
CellTable()
Constructs a table with a default page size of 15. |
|
CellTable(int pageSize)
Constructs a table with the given page size. |
|
CellTable(int pageSize,
CellTable.Resources resources)
Constructs a table with the given page size with the specified CellTable.CleanResources. |
|
| Method Summary | |
|---|---|
void |
addColumn(Column<T,?> col)
Adds a column to the table. |
void |
addColumn(Column<T,?> col,
Header<?> header)
Adds a column to the table with an associated header. |
void |
addColumn(Column<T,?> col,
Header<?> header,
Header<?> footer)
Adds a column to the table with an associated header and footer. |
void |
addColumn(Column<T,?> col,
java.lang.String headerString)
Adds a column to the table with an associated String header. |
void |
addColumn(Column<T,?> col,
java.lang.String headerString,
java.lang.String footerString)
Adds a column to the table with an associated String header and footer. |
void |
addColumnStyleName(int index,
java.lang.String styleName)
Add a style name to the TableColElement at the specified index,
creating it if necessary. |
int |
getBodyHeight()
|
int |
getDataSize()
Get the total data size. |
T |
getDisplayedItem(int indexOnPage)
|
java.util.List<T> |
getDisplayedItems()
|
int |
getHeaderHeight()
|
ProvidesKey<T> |
getKeyProvider()
|
int |
getPageSize()
|
int |
getPageStart()
|
Range |
getRange()
Get the range that this view is displaying. |
TableRowElement |
getRowElement(int row)
Get the TableRowElement for the specified row. |
boolean |
isDataSizeExact()
Returns the value of the 'isExact' parameter of the most recent call to ListView.setDataSize(int, boolean). |
boolean |
isSelectionEnabled()
Check whether or not mouse selection is enabled. |
void |
onBrowserEvent(Event event)
Fired whenever a browser event is received. |
void |
redraw()
Redraw the table using the existing data. |
void |
redrawFooters()
|
void |
redrawHeaders()
|
void |
removeColumn(Column<T,?> col)
Remove a column. |
void |
removeColumn(int index)
Remove a column. |
void |
removeColumnStyleName(int index,
java.lang.String styleName)
Remove a style from the TableColElement at the specified index. |
void |
setData(int start,
int length,
java.util.List<T> values)
Set a range of data in the view. |
void |
setDataSize(int size,
boolean isExact)
Set the total data size of the underlying data. |
void |
setDelegate(ListView.Delegate<T> delegate)
Set the ListView.Delegate that responds to changes in the range. |
void |
setKeyProvider(ProvidesKey<T> providesKey)
Sets the ProvidesKey instance that will be used to generate keys
for each record object as needed. |
void |
setPager(PagingListView.Pager<T> pager)
Set the PagingListView.Pager that allows the user to change the range. |
void |
setPageSize(int pageSize)
Set the number of rows per page and refresh the table. |
void |
setPageStart(int pageStart)
Set the starting index of the current visible page. |
void |
setRange(int start,
int length)
Set a new range. |
void |
setSelectionEnabled(boolean isSelectionEnabled)
Enable mouse and keyboard selection. |
void |
setSelectionModel(SelectionModel<? super T> selectionModel)
Set the SelectionModel used by this ListView. |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
fireEvent, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CellTable()
public CellTable(int pageSize)
pageSize - the page size
public CellTable(int pageSize,
CellTable.Resources resources)
CellTable.CleanResources.
pageSize - the page sizeresources - the resources to use for this widget| Method Detail |
|---|
public void addColumn(Column<T,?> col)
public void addColumn(Column<T,?> col,
Header<?> header)
public void addColumn(Column<T,?> col,
Header<?> header,
Header<?> footer)
public void addColumn(Column<T,?> col,
java.lang.String headerString)
public void addColumn(Column<T,?> col,
java.lang.String headerString,
java.lang.String footerString)
public void addColumnStyleName(int index,
java.lang.String styleName)
TableColElement at the specified index,
creating it if necessary.
index - the column indexstyleName - the style name to addpublic int getBodyHeight()
public int getDataSize()
PagingListView
getDataSize in interface PagingListView<T>public T getDisplayedItem(int indexOnPage)
public java.util.List<T> getDisplayedItems()
public int getHeaderHeight()
public ProvidesKey<T> getKeyProvider()
public final int getPageSize()
public final int getPageStart()
public Range getRange()
ListView
getRange in interface ListView<T>public TableRowElement getRowElement(int row)
TableRowElement for the specified row. If the row element
has not been created, null is returned.
row - the row index
java.lang.IndexOutOfBoundsException - if the row index is outside of the
current pagepublic boolean isDataSizeExact()
ListViewListView.setDataSize(int, boolean).
isDataSizeExact in interface ListView<T>public boolean isSelectionEnabled()
public void onBrowserEvent(Event event)
EventListener
onBrowserEvent in interface EventListeneronBrowserEvent in class Widgetevent - the event receivedpublic void redraw()
public void redrawFooters()
public void redrawHeaders()
public void removeColumn(int index)
index - the column indexpublic void removeColumn(Column<T,?> col)
col - the column to remove
public void removeColumnStyleName(int index,
java.lang.String styleName)
TableColElement at the specified index.
index - the column indexstyleName - the style name to remove
public void setData(int start,
int length,
java.util.List<T> values)
ListView
setData in interface ListView<T>start - the start index of the datalength - the length of the datavalues - the values within the range
public void setDataSize(int size,
boolean isExact)
ListView
setDataSize in interface ListView<T>size - the total data sizeisExact - true if the size is exact, false if it is an estimatepublic void setDelegate(ListView.Delegate<T> delegate)
ListViewListView.Delegate that responds to changes in the range.
setDelegate in interface ListView<T>delegate - the ListView.Delegatepublic void setKeyProvider(ProvidesKey<T> providesKey)
ProvidesKey instance that will be used to generate keys
for each record object as needed.
providesKey - an instance of ProvidesKey used to generate keys
for record objects.public void setPager(PagingListView.Pager<T> pager)
PagingListViewPagingListView.Pager that allows the user to change the range.
setPager in interface PagingListView<T>pager - the PagingListView.Pagerpublic final void setPageSize(int pageSize)
pageSize - the page size
java.lang.IllegalArgumentException - if pageSize is negative or 0public final void setPageStart(int pageStart)
pageStart - the index of the row that should appear at the start of
the page
public void setRange(int start,
int length)
PagingListView
setRange in interface PagingListView<T>start - the new start indexlength - the new page sizepublic void setSelectionEnabled(boolean isSelectionEnabled)
isSelectionEnabled - true to enable, false to disablepublic void setSelectionModel(SelectionModel<? super T> selectionModel)
ListViewSelectionModel used by this ListView.
setSelectionModel in interface ListView<T>selectionModel - the SelectionModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||