java.lang.Object | ||||
↳ | com.google.gwt.user.client.ui.UIObject | |||
↳ | com.google.gwt.user.client.ui.Widget | |||
↳ | com.google.gwt.user.cellview.client.AbstractHasData<T> | |||
↳ | com.google.gwt.user.cellview.client.CellTable<T> |
A tabular view that supports paging and columns.
Column
class defines the Cell
used to
render a column. Implement getValue(Object)
to retrieve the
field value from the row object that will be rendered in the Cell
.
Header
can be placed at the top
(header) or bottom (footer) of the CellTable
. You can specify a
header as text using addColumn(Column, String)
, or you can create a
custom Header
that can change with the value of the cells, such as a
column total. The Header
will be rendered every time the row data
changes or the table is redrawn. If you pass the same header instance (==)
into adjacent columns, the header will span the columns.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CellTable.BasicResources | Resources that match the GWT standard style theme. | ||||||||||
CellTable.Resources | A ClientBundle that provides images for this widget. | ||||||||||
CellTable.Style | Styles used by this widget. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a table with a default page size of 15.
| |||||||||||
Constructs a table with the given page size.
| |||||||||||
Constructs a table with a default page size of 15, and the given
key provider . | |||||||||||
Constructs a table with the given page size with the specified
CellTable.Resources . | |||||||||||
Constructs a table with the given page size and the given
key provider . | |||||||||||
Constructs a table with the given page size, the specified
CellTable.Resources , and the given key provider. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a column to the end of the table with an associated header and footer.
| |||||||||||
Adds a column to the end of the table with an associated String header and
footer.
| |||||||||||
Adds a column to the end of the table with an associated String header.
| |||||||||||
Adds a column to the end of the table with an associated header.
| |||||||||||
Adds a column to the end of the table with an associated
SafeHtml
header. | |||||||||||
Adds a column to the end of the table with an associated
SafeHtml
header and footer. | |||||||||||
Adds a column to the end of the table.
| |||||||||||
Add a handler to handle
ColumnSortEvent s. | |||||||||||
Add a style name to the
TableColElement at the specified index,
creating it if necessary. | |||||||||||
Clear the width of the specified
Column . | |||||||||||
Return the height of the table body.
| |||||||||||
Get the column at the specified index.
| |||||||||||
Get the number of columns in the table.
| |||||||||||
Get the index of the specified column.
| |||||||||||
Get the
ColumnSortList that specifies which columns are sorted. | |||||||||||
Return the height of the table header.
| |||||||||||
Get the
TableRowElement for the specified row. | |||||||||||
Inserts a column into the table at the specified index with an associated
String header.
| |||||||||||
Inserts a column into the table at the specified index with an associated
header.
| |||||||||||
Inserts a column into the table at the specified index with an associated
SafeHtml header and footer. | |||||||||||
Inserts a column into the table at the specified index with an associated
header and footer.
| |||||||||||
Inserts a column into the table at the specified index.
| |||||||||||
Inserts a column into the table at the specified index with an associated
SafeHtml header. | |||||||||||
Inserts a column into the table at the specified index with an associated
String header and footer.
| |||||||||||
Redraw the widget using the existing data.
| |||||||||||
Redraw the table's footers.
| |||||||||||
Redraw the table's headers.
| |||||||||||
Remove a column.
| |||||||||||
Remove a column.
| |||||||||||
Remove a style from the
TableColElement at the specified index. | |||||||||||
Set the width of a
Column . | |||||||||||
Set the width of a
Column . | |||||||||||
Sets the object used to determine how a row is styled; the change will take
effect the next time that the table is rendered.
| |||||||||||
Enable or disable fixed table layout. | |||||||||||
Set the width of the width and specify whether or not it should use fixed
table layout.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Convert the specified HTML into DOM elements and return the parent of the
DOM elements.
| |||||||||||
Check whether or not the cells in the view depend on the selection state.
| |||||||||||
This method is deprecated.
use
addCellPreviewHandler(com.google.gwt.view.client.CellPreviewEvent.Handler)
instead
| |||||||||||
Return the element that holds the rendered cells.
| |||||||||||
Get the element that has keyboard selection.
| |||||||||||
Check if keyboard navigation is being suppressed, such as when the user is
editing a cell.
| |||||||||||
Called when the widget is blurred.
| |||||||||||
Called after
onBrowserEvent(Event) completes. | |||||||||||
Called when the widget is focused.
| |||||||||||
Render all row values into the specified
SafeHtmlBuilder . | |||||||||||
Replace all children with the specified html.
| |||||||||||
Reset focus on the currently focused cell.
| |||||||||||
Update an element to reflect its keyboard selected state.
| |||||||||||
This method is deprecated.
this method is never called by AbstractHasData, render the
selected styles in
renderRowValues(SafeHtmlBuilder, List, int, SelectionModel)
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.cellview.client.AbstractHasData
| |||||||||||
From class
com.google.gwt.user.client.ui.Widget
| |||||||||||
From class
com.google.gwt.user.client.ui.UIObject
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface com.google.gwt.event.logical.shared.HasAttachHandlers | |||||||||||
From interface com.google.gwt.event.shared.HasHandlers | |||||||||||
From interface
com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy
| |||||||||||
From interface
com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy
| |||||||||||
From interface
com.google.gwt.user.client.EventListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.Focusable
| |||||||||||
From interface
com.google.gwt.user.client.ui.IsWidget
| |||||||||||
From interface
com.google.gwt.view.client.HasCellPreviewHandlers
| |||||||||||
From interface
com.google.gwt.view.client.HasData
| |||||||||||
From interface
com.google.gwt.view.client.HasKeyProvider
| |||||||||||
From interface
com.google.gwt.view.client.HasRows
|
Constructs a table with a default page size of 15.
Constructs a table with the given page size.
pageSize | the page size |
---|
Constructs a table with a default page size of 15, and the given
key provider
.
keyProvider | an instance of ProvidesKey |
---|
Constructs a table with the given page size with the specified
CellTable.Resources
.
pageSize | the page size |
---|---|
resources | the resources to use for this widget |
Constructs a table with the given page size and the given
key provider
.
pageSize | the page size |
---|---|
keyProvider | an instance of ProvidesKey |
Constructs a table with the given page size, the specified
CellTable.Resources
, and the given key provider.
pageSize | the page size |
---|---|
resources | the resources to use for this widget |
keyProvider | an instance of ProvidesKey |
Adds a column to the end of the table with an associated String header and footer.
col | the column to be added |
---|---|
headerString | the associated header text, as a String |
footerString | the associated footer text, as a String |
Adds a column to the end of the table with an associated String header.
col | the column to be added |
---|---|
headerString | the associated header text, as a String |
Adds a column to the end of the table with an associated header.
col | the column to be added |
---|---|
header | the associated Header
|
Adds a column to the end of the table with an associated SafeHtml
header.
col | the column to be added |
---|---|
headerHtml | the associated header text, as safe HTML |
Adds a column to the end of the table with an associated SafeHtml
header and footer.
col | the column to be added |
---|---|
headerHtml | the associated header text, as safe HTML |
footerHtml | the associated footer text, as safe HTML |
Adds a column to the end of the table.
col | the column to be added |
---|
Add a handler to handle ColumnSortEvent
s.
handler | the ColumnSortEvent.Handler to add |
---|
HandlerRegistration
to remove the handler
Add a style name to the TableColElement
at the specified index,
creating it if necessary.
index | the column index |
---|---|
styleName | the style name to add |
Clear the width of the specified Column
.
column | the column |
---|
Return the height of the table body.
Get the column at the specified index.
col | the index of the column to retrieve |
---|
Column
at the index
Get the number of columns in the table.
Get the index of the specified column.
column | the column to search for |
---|
Get the ColumnSortList
that specifies which columns are sorted.
Modifications to the ColumnSortList
will be reflected in the table
header.
ColumnSortList
Return the height of the table header.
Get the TableRowElement
for the specified row. If the row element
has not been created, null is returned.
row | the row index |
---|
IndexOutOfBoundsException | if the row index is outside of the current page |
---|
Inserts a column into the table at the specified index with an associated String header.
beforeIndex | the index to insert the column |
---|---|
col | the column to be added |
headerString | the associated header text, as a String |
Inserts a column into the table at the specified index with an associated header.
beforeIndex | the index to insert the column |
---|---|
col | the column to be added |
header | the associated Header
|
Inserts a column into the table at the specified index with an associated
SafeHtml
header and footer.
beforeIndex | the index to insert the column |
---|---|
col | the column to be added |
headerHtml | the associated header text, as safe HTML |
footerHtml | the associated footer text, as safe HTML |
Inserts a column into the table at the specified index with an associated header and footer.
beforeIndex | the index to insert the column |
---|---|
col | the column to be added |
header | the associated Header |
footer | the associated footer (as a Header object) |
IndexOutOfBoundsException | if the index is out of range |
---|
Inserts a column into the table at the specified index.
beforeIndex | the index to insert the column |
---|---|
col | the column to be added |
Inserts a column into the table at the specified index with an associated
SafeHtml
header.
beforeIndex | the index to insert the column |
---|---|
col | the column to be added |
headerHtml | the associated header text, as safe HTML |
Inserts a column into the table at the specified index with an associated String header and footer.
beforeIndex | the index to insert the column |
---|---|
col | the column to be added |
headerString | the associated header text, as a String |
footerString | the associated footer text, as a String |
Redraw the widget using the existing data.
Redraw the table's footers.
Redraw the table's headers.
Remove a column.
index | the column index |
---|
Remove a style from the TableColElement
at the specified index.
index | the column index |
---|---|
styleName | the style name to remove |
Set the width of a Column
. The layout behavior depends on whether
or not the table is using fixed layout.
column | the column |
---|---|
width | the width of the column |
unit | the Style.Unit of measurement |
Set the width of a Column
. The layout behavior depends on whether
or not the table is using fixed layout.
column | the column |
---|---|
width | the width of the column |
Sets the object used to determine how a row is styled; the change will take effect the next time that the table is rendered.
rowStyles | a RowStyles object
|
---|
Enable or disable fixed table layout.
isFixed | true to use fixed table layout, false not to |
---|
Set the width of the width and specify whether or not it should use fixed
table layout. See setTableLayoutFixed(boolean)
for more
information about fixed layout tables.
width | the width of the table |
---|---|
isFixedLayout | true to use fixed width layout, false not to |
Convert the specified HTML into DOM elements and return the parent of the DOM elements.
html | the HTML to convert |
---|
Check whether or not the cells in the view depend on the selection state.
This method is deprecated.
use
addCellPreviewHandler(com.google.gwt.view.client.CellPreviewEvent.Handler)
instead
Called when a user action triggers selection.
event | the event that triggered selection |
---|---|
value | the value that was selected |
row | the row index of the value on the page |
column | the column index where the event occurred |
Return the element that holds the rendered cells.
Element
Get the element that has keyboard selection.
Check if keyboard navigation is being suppressed, such as when the user is editing a cell.
Called when the widget is blurred.
Called after onBrowserEvent(Event)
completes.
event | the event that was fired |
---|
Called when the widget is focused.
Render all row values into the specified SafeHtmlBuilder
.
sb | the SafeHtmlBuilder to render into |
---|---|
values | the row values |
start | the absolute start index of the values |
selectionModel | the SelectionModel
|
Replace all children with the specified html.
values | the values of the new children |
---|---|
html | the html to render in the child |
Reset focus on the currently focused cell.
Update an element to reflect its keyboard selected state.
index | the index of the element |
---|---|
selected | true if selected, false if not |
stealFocus | true if the row should steal focus, false if not |
This method is deprecated.
this method is never called by AbstractHasData, render the
selected styles in
renderRowValues(SafeHtmlBuilder, List, int, SelectionModel)
Update an element to reflect its selected state.
elem | the element to update |
---|---|
selected | true if selected, false if not |