Class AbstractCellTable<T>
- Type Parameters:
T
- the data type of each row
- All Implemented Interfaces:
HasAttachHandlers
,HasHandlers
,HasKeyboardPagingPolicy
,HasKeyboardSelectionPolicy
,EventListener
,Focusable
,HasVisibility
,IsRenderable
,IsWidget
,HasCellPreviewHandlers<T>
,HasData<T>
,HasKeyProvider<T>
,HasRows
Columns
TheColumn
class defines the Cell
used to
render a column. Implement Column.getValue(Object)
to retrieve the
field value from the row object that will be rendered in the Cell
.
Headers and Footers
AHeader
can be placed at the top
(header) or bottom (footer) of the AbstractCellTable
. 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 Class Summary
Modifier and TypeClassDescriptionstatic class
Default implementation of a keyboard navigation handler for tables that supports navigation between cells.static interface
A ClientBundle that provides images for this widget.static interface
Styles used by this widget.protected static interface
Interface that this class's subclass may implement to get notified with table section change event.(package private) static interface
Nested classes/interfaces inherited from class com.google.gwt.user.cellview.client.AbstractHasData
AbstractHasData.DefaultKeyboardSelectionHandler<T>, AbstractHasData.RedrawEvent
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.user.cellview.client.HasKeyboardPagingPolicy
HasKeyboardPagingPolicy.KeyboardPagingPolicy
Nested classes/interfaces inherited from interface com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy
HasKeyboardSelectionPolicy.KeyboardSelectionPolicy
-
Field Summary
Fields inherited from class com.google.gwt.user.cellview.client.AbstractHasData
isFocused
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorDescriptionAbstractCellTable
(Element elem, int pageSize, AbstractCellTable.Resources resources, ProvidesKey<T> keyProvider) Constructs a table with the given page size, the specifiedAbstractCellTable.Style
, and the given key provider.AbstractCellTable
(Widget widget, int pageSize, AbstractCellTable.Resources resources, ProvidesKey<T> keyProvider) Constructs a table with the given page size, the specifiedAbstractCellTable.Style
, and the given key provider. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a column to the end of the table.void
Adds a column to the end of the table with an associatedSafeHtml
header.void
Adds a column to the end of the table with an associatedSafeHtml
header and footer.void
Adds a column to the end of the table with an associated header.void
Adds a column to the end of the table with an associated header and footer.void
Adds a column to the end of the table with an associated String header.void
Adds a column to the end of the table with an associated String header and footer.Add a handler to handleColumnSortEvent
s.abstract void
addColumnStyleName
(int index, String styleName) Add a style name to thecol
element at the specified index, creating it if necessary.addRowHoverHandler
(RowHoverEvent.Handler handler) Add a handler to handleRowHoverEvent
s.void
clearColumnWidth
(Column<T, ?> column) Clear the width of the specifiedColumn
.void
clearColumnWidth
(Integer column) Clear the width of the specifiedColumn
.protected Element
convertToElements
(SafeHtml html) Convert the specified HTML into DOM elements and return the parent of the DOM elements.protected boolean
Check whether or not the cells in the view depend on the selection state.protected abstract void
doSetColumnWidth
(int column, String width) Set the width of a column.protected abstract void
doSetHeaderVisible
(boolean isFooter, boolean isVisible) Show or hide a header section.void
flush()
Flush all pending changes to the table and render immediately.protected Element
Return the element that holds the rendered cells.protected TableRowElement
getChildElement
(int row) Get the element that represents the specified index.getColumn
(int col) Get the column at the specified index.int
Get the number of columns in the table.int
getColumnIndex
(Column<T, ?> column) Get the index of the specified column.Get theColumnSortList
that specifies which columns are sorted.(package private) String
getColumnWidth
(int columnIndex) Get the column width.getColumnWidth
(Column<T, ?> column) Get the width of aColumn
.Get the widget displayed when the table has no rows.Header<?>
getFooter
(int index) Get theHeaderBuilder
used to generate the footer section.Header<?>
getHeader
(int index) Get theHeaderBuilder
used to generate the header section.int
Get the index of the column that is currently selected via the keyboard.protected Element
Get the element that has keyboard selection.int
Get the index of the sub row that is currently selected via the keyboard.Get the widget displayed when the data is loading.protected int
Get the real column count, which is the greater of the number of Columns or the maximum index of a column with a defined column width.Get the resources used by this table.getRowElement
(int row) Get theTableRowElement
for the specified row.Gets the object used to determine how a row is styled.protected TableRowElement
getSubRowElement
(int absRow, int subrow) Get a subrow element given the index of the row value and the sub row index.protected abstract TableSectionElement
Get the tbody element that contains the render row values.protected abstract TableSectionElement
Get the tfoot element that contains the footers.protected abstract TableSectionElement
Get the thead element that contains the headers.void
insertColumn
(int beforeIndex, Column<T, ?> col) Inserts a column into the table at the specified index.void
insertColumn
(int beforeIndex, Column<T, ?> col, SafeHtml headerHtml) Inserts a column into the table at the specified index with an associatedSafeHtml
header.void
insertColumn
(int beforeIndex, Column<T, ?> col, SafeHtml headerHtml, SafeHtml footerHtml) Inserts a column into the table at the specified index with an associatedSafeHtml
header and footer.void
insertColumn
(int beforeIndex, Column<T, ?> col, Header<?> header) Inserts a column into the table at the specified index with an associated header.void
insertColumn
(int beforeIndex, Column<T, ?> col, Header<?> header, Header<?> footer) Inserts a column into the table at the specified index with an associated header and footer.void
insertColumn
(int beforeIndex, Column<T, ?> col, String headerString) Inserts a column into the table at the specified index with an associated String header.void
insertColumn
(int beforeIndex, Column<T, ?> col, String headerString, String footerString) Inserts a column into the table at the specified index with an associated String header and footer.boolean
Check if auto footer refresh is enabled or disabled.boolean
Check if auto header refresh is enabled or disabled.protected boolean
Check if keyboard navigation is being suppressed, such as when the user is editing a cell.boolean
Gets the skipRowHoverCheck flag.boolean
Gets the skipRowHoverFloatElementCheck flag.boolean
Gets the skipRowHoverStyleUpdate flag.protected void
onBlur()
Called when the widget is blurred.protected void
onBrowserEvent2
(Event event) Called afterAbstractHasData.onBrowserEvent(Event)
completes.protected void
onFocus()
Called when the widget is focused.void
Redraw the table's footers.void
Redraw the table's headers.protected void
void
removeColumn
(int index) Remove a column.void
removeColumn
(Column<T, ?> col) Remove a column.abstract void
removeColumnStyleName
(int index, String styleName) Remove a style from thecol
element at the specified index.protected void
renderRowValues
(SafeHtmlBuilder sb, List<T> values, int start, SelectionModel<? super T> selectionModel) Deprecated.protected final void
renderRowValuesLegacy
(SafeHtmlBuilder sb, List<T> values, int start, SelectionModel<? super T> selectionModel) Deprecated.as of GWT 2.5, use aCellTableBuilder
to customize the table structure insteadprotected void
replaceAllChildren
(List<T> values, SafeHtml html) Replace all children with the specified html.protected void
replaceChildren
(List<T> values, int start, SafeHtml html) Convert the specified HTML into DOM elements and replace the existing elements starting at the specified index.protected boolean
Reset focus on the currently focused cell.void
setAutoFooterRefreshDisabled
(boolean disabled) Enable or disable auto footer refresh when row data is changed.void
setAutoHeaderRefreshDisabled
(boolean disabled) Enable or disable auto header refresh when row data is changed.void
setColumnWidth
(int column, double width, Style.Unit unit) Set the width of aColumn
.void
setColumnWidth
(int column, String width) Set the width of aColumn
.void
setColumnWidth
(Column<T, ?> column, double width, Style.Unit unit) Set the width of aColumn
.void
setColumnWidth
(Column<T, ?> column, String width) Set the width of aColumn
.void
setEmptyTableWidget
(Widget widget) Set the widget to display when the table has no rows.void
setFooterBuilder
(FooterBuilder<T> builder) Set theHeaderBuilder
used to build the footer section of the table.void
setHeaderBuilder
(HeaderBuilder<T> builder) Set theHeaderBuilder
used to build the header section of the table.protected void
setKeyboardSelected
(int index, boolean selected, boolean stealFocus) Update an element to reflect its keyboard selected state.final void
setKeyboardSelectedColumn
(int column) Set the keyboard selected column index.void
setKeyboardSelectedColumn
(int column, boolean stealFocus) Set the keyboard selected column index and optionally focus on the new cell.void
setKeyboardSelectedRow
(int row, boolean stealFocus) Set the keyboard selected row and optionally focus on the new row.void
setKeyboardSelectedRow
(int row, int subrow, boolean stealFocus) Set the keyboard selected row and subrow, optionally focus on the new row.void
setLoadingIndicator
(Widget widget) Set the widget to display when the data is loading.void
setRowStyles
(RowStyles<T> rowStyles) Sets the object used to determine how a row is styled; the change will take effect the next time that the table is rendered.void
setSkipRowHoverCheck
(boolean skipRowHoverCheck) Sets the skipRowHoverCheck flag.void
setSkipRowHoverFloatElementCheck
(boolean skipRowHoverFloatElementCheck) Sets the skipRowHoverFloatElementCheck flag.void
setSkipRowHoverStyleUpdate
(boolean skipRowHoverStyleUpdate) Sets the skipRowHoverStyleUpdate flag.void
setTableBuilder
(CellTableBuilder<T> tableBuilder) Specify theCellTableBuilder
that will be used to render the row values into the table.Methods inherited from class com.google.gwt.user.cellview.client.AbstractHasData
addCellPreviewHandler, addLoadingStateChangeHandler, addRangeChangeHandler, addRedrawHandler, addRowCountChangeHandler, addValueChangeHandler, adopt, cellConsumesEventType, checkRowBounds, convertToElements, doAttach, doDetach, getAccessKey, getDisplayedItem, getDisplayedItems, getKeyboardPagingPolicy, getKeyboardSelectedRow, getKeyboardSelectionPolicy, getKeyProvider, getPageSize, getPageStart, getPresenter, getRowContainer, getRowCount, getSelectionModel, getTabIndex, getValueKey, getVisibleItem, getVisibleItemCount, getVisibleItems, getVisibleRange, isRowCountExact, isRowWithinBounds, onBrowserEvent, onLoadingStateChanged, onUnload, redraw, redrawRow, replaceAllChildren, replaceChildren, setAccessKey, setFocus, setFocusable, setKeyboardPagingPolicy, setKeyboardSelectedRow, setKeyboardSelectionHandler, setKeyboardSelectionPolicy, setPageSize, setPageStart, setRowCount, setRowCount, setRowData, setRowData, setSelected, setSelectionModel, setSelectionModel, setTabIndex, setVisibleRange, setVisibleRange, setVisibleRangeAndClearData, showOrHide
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onDetach, render, render, resolvePotentialElement, setWidget
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
AbstractCellTable
public AbstractCellTable(Element elem, int pageSize, AbstractCellTable.Resources resources, ProvidesKey<T> keyProvider) Constructs a table with the given page size, the specifiedAbstractCellTable.Style
, and the given key provider.- Parameters:
elem
- the parentElement
pageSize
- the page sizeresources
- the resources to apply to the widgetkeyProvider
- an instance of ProvidesKey, or null if the record object should act as its own key
-
AbstractCellTable
public AbstractCellTable(Widget widget, int pageSize, AbstractCellTable.Resources resources, ProvidesKey<T> keyProvider) Constructs a table with the given page size, the specifiedAbstractCellTable.Style
, and the given key provider.- Parameters:
widget
- the parent widgetpageSize
- the page sizeresources
- the resources to apply to the widgetkeyProvider
- an instance of ProvidesKey, or null if the record object should act as its own key
-
-
Method Details
-
addColumn
Adds a column to the end of the table.- Parameters:
col
- the column to be added
-
addColumn
Adds a column to the end of the table with an associated header.- Parameters:
col
- the column to be addedheader
- the associatedHeader
-
addColumn
Adds a column to the end of the table with an associated header and footer. -
addColumn
Adds a column to the end of the table with an associated String header.- Parameters:
col
- the column to be addedheaderString
- the associated header text, as a String
-
addColumn
Adds a column to the end of the table with an associated String header and footer.- Parameters:
col
- the column to be addedheaderString
- the associated header text, as a StringfooterString
- the associated footer text, as a String
-
addColumnSortHandler
Add a handler to handleColumnSortEvent
s.- Parameters:
handler
- theColumnSortEvent.Handler
to add- Returns:
- a
HandlerRegistration
to remove the handler
-
addColumnStyleName
Add a style name to thecol
element at the specified index, creating it if necessary.- Parameters:
index
- the column indexstyleName
- the style name to add
-
addRowHoverHandler
Add a handler to handleRowHoverEvent
s.- Parameters:
handler
- theRowHoverEvent.Handler
to add- Returns:
- a
HandlerRegistration
to remove the handler
-
clearColumnWidth
Clear the width of the specifiedColumn
.- Parameters:
column
- the column
-
clearColumnWidth
Clear the width of the specifiedColumn
.- Parameters:
column
- the column index
-
flush
public void flush()Flush all pending changes to the table and render immediately.Modifications to the table, such as adding columns or setting data, are not rendered immediately. Instead, changes are coalesced at the end of the current event loop to avoid rendering the table multiple times. Use this method to force the table to render all pending modifications immediately.
-
getColumn
Get the column at the specified index.- Parameters:
col
- the index of the column to retrieve- Returns:
- the
Column
at the index
-
getColumnCount
public int getColumnCount()Get the number of columns in the table.- Returns:
- the column count
-
getColumnIndex
Get the index of the specified column.- Parameters:
column
- the column to search for- Returns:
- the index of the column, or -1 if not found
-
getColumnSortList
Get theColumnSortList
that specifies which columns are sorted. Modifications to theColumnSortList
will be reflected in the table header.Note that the implementation may redraw the headers on every modification to the
ColumnSortList
.- Returns:
- the
ColumnSortList
-
getColumnWidth
Get the width of aColumn
.- Parameters:
column
- the column- Returns:
- the width of the column, or null if not set
- See Also:
-
getEmptyTableWidget
Get the widget displayed when the table has no rows.- Returns:
- the empty table widget
-
getHeader
-
getHeaderBuilder
Get theHeaderBuilder
used to generate the header section. -
getKeyboardSelectedColumn
public int getKeyboardSelectedColumn()Get the index of the column that is currently selected via the keyboard.- Returns:
- the currently selected column, or -1 if none selected
-
getKeyboardSelectedSubRow
public int getKeyboardSelectedSubRow()Get the index of the sub row that is currently selected via the keyboard. If the row value maps to one rendered row element, the subrow is 0.- Returns:
- the currently selected subrow, or -1 if none selected
-
getLoadingIndicator
Get the widget displayed when the data is loading.- Returns:
- the loading indicator
-
getResources
Get the resources used by this table. -
getRowElement
Get theTableRowElement
for the specified row. If the row element has not been created, null is returned.- Parameters:
row
- the row index- Returns:
- the row element, or null if it doesn't exists
- Throws:
IndexOutOfBoundsException
- if the row index is outside of the current page
-
getRowStyles
Gets the object used to determine how a row is styled.- Returns:
- the
RowStyles
object if set, null if not
-
insertColumn
Inserts a column into the table at the specified index.- Parameters:
beforeIndex
- the index to insert the columncol
- the column to be added
-
insertColumn
Inserts a column into the table at the specified index with an associated header.- Parameters:
beforeIndex
- the index to insert the columncol
- the column to be addedheader
- the associatedHeader
-
insertColumn
Inserts a column into the table at the specified index with an associated header and footer.- Parameters:
beforeIndex
- the index to insert the columncol
- the column to be addedheader
- the associatedHeader
footer
- the associated footer (as aHeader
object)- Throws:
IndexOutOfBoundsException
- if the index is out of range
-
insertColumn
Inserts a column into the table at the specified index with an associated String header.- Parameters:
beforeIndex
- the index to insert the columncol
- the column to be addedheaderString
- the associated header text, as a String
-
insertColumn
public void insertColumn(int beforeIndex, Column<T, ?> col, String headerString, String footerString) Inserts a column into the table at the specified index with an associated String header and footer.- Parameters:
beforeIndex
- the index to insert the columncol
- the column to be addedheaderString
- the associated header text, as a StringfooterString
- the associated footer text, as a String
-
isAutoHeaderRefreshDisabled
public boolean isAutoHeaderRefreshDisabled()Check if auto header refresh is enabled or disabled.- Returns:
- true if disabled, false if enabled
- See Also:
-
isSkipRowHoverCheck
public boolean isSkipRowHoverCheck()Gets the skipRowHoverCheck flag. If true, the CellTable will not check for row-level hover events (MOUSEOVER and MOUSEOUT).- Returns:
- the flag value
-
isSkipRowHoverFloatElementCheck
public boolean isSkipRowHoverFloatElementCheck()Gets the skipRowHoverFloatElementCheck flag. If true, the CellTable will not check for floating (fixed position) elements over the hovered row.- Returns:
- the flag value
-
isSkipRowHoverStyleUpdate
public boolean isSkipRowHoverStyleUpdate()Gets the skipRowHoverStyleUpdate flag. If true, the CellTable will not update the row's style on row-level hover events (MOUSEOVER and MOUSEOUT).- Returns:
- the flag value
-
redrawHeaders
public void redrawHeaders()Redraw the table's headers. The headers will be re-rendered synchronously. -
removeColumn
Remove a column.- Parameters:
col
- the column to remove
-
removeColumn
public void removeColumn(int index) Remove a column.- Parameters:
index
- the column index
-
removeColumnStyleName
Remove a style from thecol
element at the specified index.- Parameters:
index
- the column indexstyleName
- the style name to remove
-
setAutoHeaderRefreshDisabled
public void setAutoHeaderRefreshDisabled(boolean disabled) Enable or disable auto header refresh when row data is changed. By default, headers are refreshed every time the row data changes in case the footers depend on the current row data. If the footers do not depend on the current row data, you can disable this feature to improve performance.Note that footers will still refresh when columns are added or removed, regardless of whether or not this feature is enabled.
-
setColumnWidth
Set the width of aColumn
. The width will persist with the column and takes precedence of any width set viasetColumnWidth(int, String)
.- Parameters:
column
- the columnwidth
- the width of the column
-
setColumnWidth
Set the width of aColumn
. The width will persist with the column and takes precedence of any width set viasetColumnWidth(int, double, Unit)
.- Parameters:
column
- the columnwidth
- the width of the columnunit
- theStyle.Unit
of measurement
-
setColumnWidth
Set the width of aColumn
.- Parameters:
column
- the columnwidth
- the width of the columnunit
- theStyle.Unit
of measurement
-
setColumnWidth
Set the width of aColumn
.- Parameters:
column
- the columnwidth
- the width of the column
-
setEmptyTableWidget
Set the widget to display when the table has no rows.- Parameters:
widget
- the empty table widget, or null to disable
-
setHeaderBuilder
Set theHeaderBuilder
used to build the header section of the table. -
setKeyboardSelectedColumn
public final void setKeyboardSelectedColumn(int column) Set the keyboard selected column index.If keyboard selection is disabled, this method does nothing.
If the keyboard selected column is greater than the number of columns in the keyboard selected row, the last column in the row is selected, but the column index is remembered.
- Parameters:
column
- the column index, greater than or equal to zero
-
setKeyboardSelectedColumn
public void setKeyboardSelectedColumn(int column, boolean stealFocus) Set the keyboard selected column index and optionally focus on the new cell.- Parameters:
column
- the column index, greater than or equal to zerostealFocus
- true to focus on the new column- See Also:
-
setKeyboardSelectedRow
public void setKeyboardSelectedRow(int row, boolean stealFocus) Description copied from class:AbstractHasData
Set the keyboard selected row and optionally focus on the new row.- Overrides:
setKeyboardSelectedRow
in classAbstractHasData<T>
- Parameters:
row
- the row index relative to the page startstealFocus
- true to focus on the new row- See Also:
-
setKeyboardSelectedRow
public void setKeyboardSelectedRow(int row, int subrow, boolean stealFocus) Set the keyboard selected row and subrow, optionally focus on the new row.- Parameters:
row
- the row index relative to the page startsubrow
- the row index of the child rowstealFocus
- true to focus on the new row- See Also:
-
setLoadingIndicator
Set the widget to display when the data is loading.- Parameters:
widget
- the loading indicator, or null to disable
-
setRowStyles
Sets the object used to determine how a row is styled; the change will take effect the next time that the table is rendered.- Parameters:
rowStyles
- aRowStyles
object
-
setSkipRowHoverCheck
public void setSkipRowHoverCheck(boolean skipRowHoverCheck) Sets the skipRowHoverCheck flag. If set, the CellTable will not check for row-level hover events (MOUSEOVER and MOUSEOUT).- Parameters:
skipRowHoverCheck
- the new flag value
-
setSkipRowHoverFloatElementCheck
public void setSkipRowHoverFloatElementCheck(boolean skipRowHoverFloatElementCheck) Sets the skipRowHoverFloatElementCheck flag. If set, the CellTable will not not check for floating (fixed position) elements over the hovered row.- Parameters:
skipRowHoverFloatElementCheck
- the new flag value
-
setSkipRowHoverStyleUpdate
public void setSkipRowHoverStyleUpdate(boolean skipRowHoverStyleUpdate) Sets the skipRowHoverStyleUpdate flag. If set, the CellTable will not update the row's style on row-level hover events (MOUSEOVER and MOUSEOUT).- Parameters:
skipRowHoverCheck
- the new flag value
-
setTableBuilder
Specify theCellTableBuilder
that will be used to render the row values into the table. -
dependsOnSelection
protected boolean dependsOnSelection()Description copied from class:AbstractHasData
Check whether or not the cells in the view depend on the selection state.- Specified by:
dependsOnSelection
in classAbstractHasData<T>
- Returns:
- true if cells depend on selection, false if not
-
doSetColumnWidth
Set the width of a column.- Parameters:
column
- the column indexwidth
- the width, or null to clear the width
-
doSetHeaderVisible
protected abstract void doSetHeaderVisible(boolean isFooter, boolean isVisible) Show or hide a header section.- Parameters:
isFooter
- true for the footer, false for the headerisVisible
- true to show, false to hide
-
getChildContainer
Description copied from class:AbstractHasData
Return the element that holds the rendered cells.- Specified by:
getChildContainer
in classAbstractHasData<T>
- Returns:
- the container
Element
-
getChildElement
Get the element that represents the specified index.The row element may not be the same as the TR element at the specified index if some row values are rendered with additional rows.
- Overrides:
getChildElement
in classAbstractHasData<T>
- Parameters:
row
- the row index, relative to the page start- Returns:
- the row element, or null if it doesn't exists
- Throws:
IndexOutOfBoundsException
- if the row index is outside of the current page
-
getKeyboardSelectedElement
Description copied from class:AbstractHasData
Get the element that has keyboard selection.- Specified by:
getKeyboardSelectedElement
in classAbstractHasData<T>
- Returns:
- the keyboard selected element
-
getRealColumnCount
protected int getRealColumnCount()Get the real column count, which is the greater of the number of Columns or the maximum index of a column with a defined column width. -
getTableBodyElement
Get the tbody element that contains the render row values. -
getTableFootElement
Get the tfoot element that contains the footers. -
getTableHeadElement
Get the thead element that contains the headers. -
onBlur
protected void onBlur()Description copied from class:AbstractHasData
Called when the widget is blurred.- Overrides:
onBlur
in classAbstractHasData<T>
-
onBrowserEvent2
Description copied from class:AbstractHasData
Called afterAbstractHasData.onBrowserEvent(Event)
completes.- Overrides:
onBrowserEvent2
in classAbstractHasData<T>
- Parameters:
event
- the event that was fired
-
onFocus
protected void onFocus()Description copied from class:AbstractHasData
Called when the widget is focused.- Overrides:
onFocus
in classAbstractHasData<T>
-
refreshColumnWidths
protected void refreshColumnWidths() -
resetFocusOnCell
protected boolean resetFocusOnCell()Description copied from class:AbstractHasData
Reset focus on the currently focused cell.- Specified by:
resetFocusOnCell
in classAbstractHasData<T>
- Returns:
- true if focus is taken, false if not
-
setKeyboardSelected
protected void setKeyboardSelected(int index, boolean selected, boolean stealFocus) Description copied from class:AbstractHasData
Update an element to reflect its keyboard selected state.- Specified by:
setKeyboardSelected
in classAbstractHasData<T>
- Parameters:
index
- the index of the elementselected
- true if selected, false if notstealFocus
- true if the row should steal focus, false if not
-
getColumnWidth
Get the column width. Associating a width with aColumn
takes precedence over setting the width of a column index.- Parameters:
columnIndex
- the column index- Returns:
- the column width, or null if none specified
-
getSubRowElement
Get a subrow element given the index of the row value and the sub row index.- Parameters:
absRow
- the absolute row value indexsubrow
- the index of the subrow beneath the row.- Returns:
- the row element, or null if not found
-
CellTableBuilder
to customize the table structure instead