public interface DataGrid<E extends Entity> extends ListComponent<E>, Component.HasButtonsPanel, Component.HasCaption, Component.HasIcon, Component.HasRowsCount, Component.HasSettings, LookupComponent, Component.Focusable
| Modifier and Type | Interface and Description |
|---|---|
static class |
DataGrid.AbstractDataGridEditorEvent
The root class from which all DataGrid editor event state objects shall be derived.
|
static class |
DataGrid.AbstractDataGridEvent
The root class from which all DataGrid event state objects shall be derived.
|
static interface |
DataGrid.ButtonRenderer
A Renderer that displays a button with a textual caption.
|
static interface |
DataGrid.CellDescriptionProvider<E extends Entity>
A callback interface for generating optional descriptions (tooltips) for
DataGrid cells.
|
static interface |
DataGrid.CellStyleProvider<E extends Entity>
Allows to define different styles for DataGrid cells.
|
static interface |
DataGrid.CheckBoxRenderer
A renderer that represents a boolean values as a graphical check box icons.
|
static interface |
DataGrid.ClickableTextRenderer
A renderer for presenting simple plain-text string values as a link with call back handler.
|
static interface |
DataGrid.Column
A column in the DataGrid.
|
static class |
DataGrid.ColumnCollapsingChangeEvent
An event that is fired when a column's collapsing changes.
|
static interface |
DataGrid.ColumnCollapsingChangeListener
An event listener for column collapsing change events in the DataGrid.
|
static interface |
DataGrid.ColumnEditorFieldGenerator
Field generator that generates component for column in
DataGrid editor. |
static interface |
DataGrid.ColumnGenerator<E,T> |
static class |
DataGrid.ColumnGeneratorEvent<E>
Event provided by a
DataGrid.ColumnGenerator |
static class |
DataGrid.ColumnReorderEvent
An event that is fired when the columns are reordered.
|
static interface |
DataGrid.ColumnReorderListener
An event listener for column reorder events in the DataGrid.
|
static class |
DataGrid.ColumnResizeEvent
An event that is fired when a column is resized.
|
static interface |
DataGrid.ColumnResizeListener
An event listener for column resize events in the DataGrid.
|
static class |
DataGrid.ColumnResizeMode |
static interface |
DataGrid.ComponentRenderer
A renderer for UI components.
|
static class |
DataGrid.ContextClickEvent
Context click event fired by a
DataGrid. |
static interface |
DataGrid.ContextClickListener
Listener for context click events.
|
static interface |
DataGrid.Converter<P,M>
Interface that implements conversion between a model and a presentation type.
|
static class |
DataGrid.DataGridClickEvent
Class for holding information about a mouse click event.
|
static class |
DataGrid.DataGridStaticCellType
Enumeration, specifying the content type of a Cell in a DataGrid header or footer.
|
static interface |
DataGrid.DateRenderer
A renderer for presenting date values.
|
static interface |
DataGrid.DetailsGenerator<E extends Entity>
A callback interface for generating details for a particular row in Grid.
|
static class |
DataGrid.EditorCloseEvent
An event that is fired when the DataGrid editor is closed.
|
static interface |
DataGrid.EditorCloseListener
DataGrid editor close listener.
|
static class |
DataGrid.EditorOpenEvent
An event that is fired before the DataGrid editor is opened.
|
static interface |
DataGrid.EditorOpenListener
DataGrid editor open listener.
|
static class |
DataGrid.EditorPostCommitEvent
An event that is fired after the item is updated.
|
static interface |
DataGrid.EditorPostCommitListener
DataGrid editor post commit listener.
|
static class |
DataGrid.EditorPreCommitEvent
An event that is fired before the item is updated.
|
static interface |
DataGrid.EditorPreCommitListener
DataGrid editor pre commit listener.
|
static interface |
DataGrid.FooterCell
Represents a footer cell in DataGrid.
|
static interface |
DataGrid.FooterRow
Represents a footer row in DataGrid.
|
static interface |
DataGrid.HasNullRepresentation
Renderer has null representation.
|
static interface |
DataGrid.HasRendererClickListener
Renderer has click listener.
|
static interface |
DataGrid.HeaderCell
Represents a header cell in DataGrid.
|
static interface |
DataGrid.HeaderRow
Represents a header row in DataGrid.
|
static interface |
DataGrid.HtmlRenderer
A renderer for presenting HTML content.
|
static interface |
DataGrid.ImageRenderer
A renderer for presenting images.
|
static class |
DataGrid.ItemClickEvent<E>
Click event fired by a
DataGrid |
static interface |
DataGrid.ItemClickListener<E>
Listener for item click events.
|
static interface |
DataGrid.NumberRenderer
A renderer for presenting number values.
|
static interface |
DataGrid.ProgressBarRenderer
A renderer that represents a double values as a graphical progress bar.
|
static interface |
DataGrid.Renderer
Marker interface to indicate that the implementing class can be used as a renderer.
|
static class |
DataGrid.RendererClickEvent
Click event fired by a
DataGrid.HasRendererClickListener |
static interface |
DataGrid.RendererClickListener
Renderer listens to clicks.
|
static interface |
DataGrid.RowDescriptionProvider<E extends Entity>
A callback interface for generating optional descriptions (tooltips) for
DataGrid rows.
|
static interface |
DataGrid.RowStyleProvider<E extends Entity>
Allows to define different styles for DataGrid rows.
|
static class |
DataGrid.ScrollDestination
Enumeration, specifying the destinations that are supported when scrolling
rows or columns into view.
|
static class |
DataGrid.SelectionEvent<E>
An event that specifies what in a selection has changed, and where the
selection took place.
|
static interface |
DataGrid.SelectionListener<E>
An event listener for selection events in the DataGrid.
|
static class |
DataGrid.SelectionMode |
static class |
DataGrid.SortDirection
Describes sorting direction.
|
static class |
DataGrid.SortEvent
An event that is fired when a sort order is changed.
|
static interface |
DataGrid.SortListener
Listener for sort order change events.
|
static class |
DataGrid.SortOrder
Sort order descriptor.
|
static interface |
DataGrid.StaticCell
Base interface for DataGrid header or footer cells.
|
static interface |
DataGrid.StaticRow<T extends DataGrid.StaticCell>
Base interface for DataGrid header and footer rows.
|
static interface |
DataGrid.TextRenderer
A renderer for presenting simple plain-text string values.
|
ListComponent.IconProvider<E extends Entity>Component.ActionOwner, Component.ActionsHolder, Component.Alignment, Component.BelongToFrame, Component.Buffered, Component.ChildEditableController, Component.Collapsable, Component.Container, Component.ContextHelpIconClickEvent, Component.Disposable, Component.Editable, Component.EditableChangeEvent, Component.EditableChangeListener, Component.EditableChangeNotifier, Component.ExpandedStateChangeEvent, Component.ExpandedStateChangeListener, Component.Focusable, Component.HasBorder, Component.HasButtonsPanel, Component.HasCaption, Component.HasContextHelp, Component.HasFormatter, Component.HasIcon, Component.HasInputPrompt, Component.HasNamedComponents, Component.HasOptionsStyleProvider, Component.HasPresentations, Component.HasRowsCount, Component.HasSettings, Component.HasValue, Component.HasXmlDescriptor, Component.LayoutClickEvent, Component.LayoutClickListener, Component.LayoutClickNotifier, Component.Margin, Component.MouseEventDetails, Component.OptionsStyleProvider, Component.OrderedContainer, Component.OuterMargin, Component.SecuredActionsHolder, Component.ShortcutAction, Component.ShortcutNotifier, Component.ShortcutTriggeredEvent, Component.Spacing, Component.UiPermissionAware, Component.Validatable, Component.ValueChangeEvent, Component.ValueChangeListener, Component.WrapperLookupComponent.LookupSelectionChangeEvent, LookupComponent.LookupSelectionChangeListener, LookupComponent.LookupSelectionChangeNotifier| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
AUTO_SIZE, AUTO_SIZE_PX, UNITS_PERCENTAGE, UNITS_PIXELS| Modifier and Type | Method and Description |
|---|---|
void |
addCellStyleProvider(DataGrid.CellStyleProvider<? super E> styleProvider)
Adds style provider for the DataGrid cells.
|
void |
addColumn(DataGrid.Column column)
Adds the given column to DataGrid.
|
void |
addColumn(DataGrid.Column column,
int index)
Adds the given column at the specified index to DataGrid.
|
DataGrid.Column |
addColumn(java.lang.String id,
MetaPropertyPath propertyPath)
Creates new column with given Id and property, then adds this column to DataGrid.
|
DataGrid.Column |
addColumn(java.lang.String id,
MetaPropertyPath propertyPath,
int index)
Creates new column with given Id and property at the specified index,
then adds this column to DataGrid.
|
void |
addColumnCollapsingChangeListener(DataGrid.ColumnCollapsingChangeListener listener)
Registers a new column collapsing change listener
|
void |
addColumnReorderListener(DataGrid.ColumnReorderListener listener)
Registers a new column reorder listener.
|
void |
addColumnResizeListener(DataGrid.ColumnResizeListener listener)
Registers a new column resize listener.
|
void |
addContextClickListener(DataGrid.ContextClickListener listener)
Registers a new context click listener
|
void |
addEditorCloseListener(DataGrid.EditorCloseListener listener)
Registers a new DataGrid editor close listener.
|
void |
addEditorOpenListener(DataGrid.EditorOpenListener listener)
Registers a new DataGrid editor open listener.
|
void |
addEditorPostCommitListener(DataGrid.EditorPostCommitListener listener)
Registers a new DataGrid editor post commit listener.
|
void |
addEditorPreCommitListener(DataGrid.EditorPreCommitListener listener)
Registers a new DataGrid editor pre commit listener.
|
DataGrid.FooterRow |
addFooterRowAt(int index)
Inserts a new row at the given position to the footer section.
|
DataGrid.Column |
addGeneratedColumn(java.lang.String columnId,
DataGrid.ColumnGenerator<E,?> generator)
Add a generated column to the DataGrid.
|
DataGrid.Column |
addGeneratedColumn(java.lang.String columnId,
DataGrid.ColumnGenerator<E,?> generator,
int index)
Add a generated column to the DataGrid.
|
DataGrid.HeaderRow |
addHeaderRowAt(int index)
Inserts a new row at the given position to the header section.
|
void |
addItemClickListener(DataGrid.ItemClickListener<E> listener)
Registers a new item click listener
|
void |
addRowStyleProvider(DataGrid.RowStyleProvider<? super E> styleProvider)
Adds style provider for the DataGrid rows.
|
void |
addSelectionListener(DataGrid.SelectionListener<E> listener)
Registers a new selection listener
|
void |
addSortListener(DataGrid.SortListener listener)
Registers a new sort order change listener
|
DataGrid.FooterRow |
appendFooterRow()
Adds a new row at the bottom of the footer section.
|
DataGrid.HeaderRow |
appendHeaderRow()
Adds a new row at the bottom of the header section.
|
<T extends DataGrid.Renderer> |
createRenderer(java.lang.Class<T> type)
Creates renderer implementation by its type.
|
void |
edit(E entity)
Opens the editor interface for the provided entity.
|
void |
editItem(java.lang.Object itemId)
Deprecated.
Use
edit(Entity) |
DataGrid.CellDescriptionProvider |
getCellDescriptionProvider()
Returns the
CellDescriptionProvider instance used to generate
descriptions (tooltips) for DataGrid cells. |
DataGrid.Column |
getColumn(java.lang.String id)
Returns a column based on the Id.
|
DataGrid.ColumnGenerator<E,?> |
getColumnGenerator(java.lang.String columnId)
Gets the columns generator for the given column id.
|
DataGrid.Column |
getColumnNN(java.lang.String id)
Returns a column by its Id.
|
DataGrid.ColumnResizeMode |
getColumnResizeMode()
Returns the current column resize mode.
|
java.util.List<DataGrid.Column> |
getColumns()
Returns a copy of currently configured columns in their current visual
order in this DataGrid.
|
CollectionDatasource |
getDatasource() |
DataGrid.HeaderRow |
getDefaultHeaderRow()
Returns the current default row of the header section.
|
DataGrid.DetailsGenerator<E> |
getDetailsGenerator() |
java.lang.Object |
getEditedItemId()
Gets the id of the item that is currently being edited.
|
java.lang.String |
getEditorCancelCaption()
Gets the current caption of the cancel button in the DataGrid editor.
|
java.lang.String |
getEditorSaveCaption()
Gets the current caption of the save button in the DataGrid editor.
|
Action |
getEnterPressAction() |
DataGrid.FooterRow |
getFooterRow(int index)
Gets the footer row at given index.
|
int |
getFooterRowCount()
Gets the row count for the footer.
|
int |
getFrozenColumnCount()
Gets the number of frozen columns in this DataGrid.
|
DataGrid.HeaderRow |
getHeaderRow(int index)
Gets the header row at given index.
|
int |
getHeaderRowCount()
Gets the row count for the header section.
|
Action |
getItemClickAction() |
DataGrid.RowDescriptionProvider |
getRowDescriptionProvider()
Returns the
RowDescriptionProvider instance used to generate
descriptions (tooltips) for DataGrid rows |
DataGrid.SelectionMode |
getSelectionMode() |
java.util.List<DataGrid.SortOrder> |
getSortOrder() |
java.util.List<DataGrid.Column> |
getVisibleColumns()
Returns a copy of columns not hidden by security permissions.
|
boolean |
isColumnReorderingAllowed()
Returns whether column reordering is allowed.
|
boolean |
isColumnsCollapsingAllowed() |
boolean |
isContextMenuEnabled() |
boolean |
isDetailsVisible(Entity entity)
Checks whether details are visible for the given item.
|
boolean |
isEditorActive()
Returns whether an item is currently being edited in the editor.
|
boolean |
isEditorBuffered()
Gets the buffered editor mode.
|
boolean |
isEditorEnabled()
Checks whether the item editor UI is enabled for this DataGrid.
|
boolean |
isHeaderVisible()
Returns the visibility of the header section.
|
boolean |
isSortable() |
boolean |
isTextSelectionEnabled() |
DataGrid.FooterRow |
prependFooterRow()
Adds a new row at the top of the footer section.
|
DataGrid.HeaderRow |
prependHeaderRow()
Adds a new row at the top of the header section.
|
void |
removeCellStyleProvider(DataGrid.CellStyleProvider<? super E> styleProvider)
Removes style provider for the DataGrid cells.
|
void |
removeColumn(DataGrid.Column column)
Removes the given column from DataGrid or do nothing if column is
null. |
void |
removeColumn(java.lang.String id)
Removes a column from DataGrid by its Id or do nothing if column is not found.
|
void |
removeColumnCollapsingChangeListener(DataGrid.ColumnCollapsingChangeListener listener)
Removes a previously registered column collapsing change listener
|
void |
removeColumnReorderListener(DataGrid.ColumnReorderListener listener)
Removes a previously registered column reorder listener.
|
void |
removeColumnResizeListener(DataGrid.ColumnResizeListener listener)
Removes a previously registered column resize listener.
|
void |
removeContextClickListener(DataGrid.ContextClickListener listener)
Removes a previously registered context click listener
|
void |
removeEditorCloseListener(DataGrid.EditorCloseListener listener)
Removes a previously registered DataGrid editor close listener.
|
void |
removeEditorOpenListener(DataGrid.EditorOpenListener listener)
Removes a previously registered DataGrid editor open listener.
|
void |
removeEditorPostCommitListener(DataGrid.EditorPostCommitListener listener)
Removes a previously registered DataGrid editor post commit listener.
|
void |
removeEditorPreCommitListener(DataGrid.EditorPreCommitListener listener)
Removes a previously registered DataGrid editor pre commit listener.
|
void |
removeFooterRow(DataGrid.FooterRow footerRow)
Removes the given row from the footer section.
|
void |
removeFooterRow(int index)
Removes the row at the given position from the footer section.
|
void |
removeHeaderRow(DataGrid.HeaderRow headerRow)
Removes the given row from the header section.
|
void |
removeHeaderRow(int index)
Removes the row at the given position from the header section.
|
void |
removeItemClickListener(DataGrid.ItemClickListener<E> listener)
Removes a previously registered item click listener
|
void |
removeRowStyleProvider(DataGrid.RowStyleProvider<? super E> styleProvider)
Removes style provider for the DataGrid rows.
|
void |
removeSelectionListener(DataGrid.SelectionListener<E> listener)
Removes a previously registered selection change listener
|
void |
removeSortListener(DataGrid.SortListener listener)
Removes a previously registered sort order change listener
|
void |
repaint()
Repaint UI representation of the DataGrid without refreshing the table data.
|
void |
scrollTo(E item)
Scrolls to a certain item, using
DataGrid.ScrollDestination.ANY. |
void |
scrollTo(E item,
DataGrid.ScrollDestination destination)
Scrolls to a certain item, using user-specified scroll destination.
|
void |
scrollToEnd()
Scrolls to the last data item.
|
void |
scrollToStart()
Scrolls to the first data item.
|
void |
selectAll()
Marks all the items in the current data provider as selected
|
void |
setCellDescriptionProvider(DataGrid.CellDescriptionProvider<E> provider)
Sets the
CellDescriptionProvider instance for generating
optional descriptions (tooltips) for individual DataGrid cells. |
void |
setColumnReorderingAllowed(boolean columnReorderingAllowed)
Sets whether or not column reordering is allowed.
|
void |
setColumnResizeMode(DataGrid.ColumnResizeMode mode)
Sets the column resize mode to use.
|
void |
setColumnsCollapsingAllowed(boolean columnsCollapsingAllowed)
Defines if collapsible attribute can be changed for individual column or not.
|
void |
setContextMenuEnabled(boolean contextMenuEnabled)
Sets whether or not context menu is enabled.
|
void |
setDatasource(CollectionDatasource datasource)
Sets an instance of
CollectionDatasource as the DataGrid data source. |
void |
setDefaultHeaderRow(DataGrid.HeaderRow headerRow)
Sets the default row of the header.
|
void |
setDetailsGenerator(DataGrid.DetailsGenerator<E> detailsGenerator)
Sets a new details generator for row details.
|
void |
setDetailsVisible(Entity entity,
boolean visible)
Shows or hides the details for a specific item.
|
void |
setEditorBuffered(boolean editorBuffered)
Sets the buffered editor mode.
|
void |
setEditorCancelCaption(java.lang.String cancelCaption)
Sets the caption on the cancel button in the DataGrid editor.
|
void |
setEditorEnabled(boolean isEnabled)
Sets whether or not the item editor UI is enabled for this DataGrid.
|
void |
setEditorSaveCaption(java.lang.String saveCaption)
Sets the caption on the save button in the DataGrid editor.
|
void |
setEnterPressAction(Action action)
Assigns an action to be executed on Enter key press.
|
void |
setFrozenColumnCount(int numberOfColumns)
Sets the number of frozen columns in this grid.
|
void |
setHeaderVisible(boolean headerVisible)
Sets the visibility of the header section.
|
void |
setItemClickAction(Action action)
Assigns an action to be executed on double click on a DataGrid row.
|
void |
setRowDescriptionProvider(DataGrid.RowDescriptionProvider<E> provider)
Sets the
RowDescriptionProvider instance for generating
optional descriptions (tooltips) for DataGrid rows. |
void |
setSelectionMode(DataGrid.SelectionMode selectionMode)
Sets the DataGrid's selection mode.
|
void |
setSortable(boolean sortable)
Defines if this attribute can be changed for individual column or not.
|
void |
setTextSelectionEnabled(boolean textSelectionEnabled)
Enable or disable text selection in DataGrid cells.
|
void |
sort(java.lang.String columnId,
DataGrid.SortDirection direction)
Sorts the DataGrid data for passed column id in the chosen sort direction.
|
getSelected, getSingleSelected, isMultiSelect, setSelected, setSelectedgetFrame, setFrameaddAction, addAction, getAction, getActionNN, getActions, removeAction, removeAction, removeAllActionsaddStyleName, getAlignment, getDebugId, getHeight, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthUnits, isEnabled, isEnabledItself, isResponsive, isVisible, isVisibleItself, removeStyleName, requestFocus, setAlignment, setDebugId, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapCompositiongetButtonsPanel, setButtonsPanelgetCaption, getDescription, setCaption, setDescriptiongetIcon, setIcon, setIconFromSetgetRowsCount, setRowsCountapplySettings, isSettingsEnabled, saveSettings, setSettingsEnabledgetLookupSelectedItems, setLookupSelectHandlergetTabIndex, isFocusable, setFocusable, setTabIndexstatic final java.lang.String NAME
java.util.List<DataGrid.Column> getColumns()
getVisibleColumns()java.util.List<DataGrid.Column> getVisibleColumns()
getColumns()@Nullable DataGrid.Column getColumn(java.lang.String id)
id - the column Idnull if not foundgetColumnNN(String)DataGrid.Column getColumnNN(java.lang.String id)
id - the column Idjava.lang.IllegalStateException - if not foundgetColumn(String)void addColumn(DataGrid.Column column)
column - the column to addaddColumn(Column, int),
addColumn(String, MetaPropertyPath),
addColumn(String, MetaPropertyPath, int)void addColumn(DataGrid.Column column, int index)
column - the column to addindex - index of a new columnaddColumn(Column),
addColumn(String, MetaPropertyPath),
addColumn(String, MetaPropertyPath, int)DataGrid.Column addColumn(java.lang.String id, MetaPropertyPath propertyPath)
id - the column IdpropertyPath - the instance of MetaPropertyPath representing a relative path
to a property from certain MetaClassaddColumn(Column),
addColumn(Column, int),
addColumn(String, MetaPropertyPath, int)DataGrid.Column addColumn(java.lang.String id, MetaPropertyPath propertyPath, int index)
id - the column IdpropertyPath - the instance of MetaPropertyPath representing a relative path
to a property from certain MetaClassindex - index of a new columnaddColumn(Column),
addColumn(Column, int),
addColumn(String, MetaPropertyPath)void removeColumn(DataGrid.Column column)
null.column - the column to addremoveColumn(String)void removeColumn(java.lang.String id)
id - the columns IdremoveColumn(Column)CollectionDatasource getDatasource()
getDatasource in interface ListComponent<E extends Entity>void setDatasource(CollectionDatasource datasource)
CollectionDatasource as the DataGrid data source.datasource - the DataGrid data source, not nullvoid selectAll()
void sort(java.lang.String columnId,
DataGrid.SortDirection direction)
columnId - id of the column to sortdirection - sort directionjava.util.List<DataGrid.SortOrder> getSortOrder()
boolean isTextSelectionEnabled()
true if text selection is enabled.void setTextSelectionEnabled(boolean textSelectionEnabled)
false.textSelectionEnabled - specifies whether text selection in DataGrid cells is enabledboolean isColumnReorderingAllowed()
true.true if reordering is allowedvoid setColumnReorderingAllowed(boolean columnReorderingAllowed)
true.columnReorderingAllowed - specifies whether column reordering is allowedboolean isHeaderVisible()
true if visible, false otherwisevoid setHeaderVisible(boolean headerVisible)
headerVisible - true to show header section, false to hideboolean isContextMenuEnabled()
true if context menu is enabled, false otherwisevoid setContextMenuEnabled(boolean contextMenuEnabled)
true.contextMenuEnabled - specifies whether context menu is enabledAction getItemClickAction()
setItemClickAction(Action)setItemClickAction(Action)void setItemClickAction(Action action)
If such action is not set, the table responds to pressing Enter by trying to find and execute the following actions:
shortcut propertyIf one of these actions is found and it is enabled, it is executed.
action - an action to be executed on double click on a DataGrid rowAction getEnterPressAction()
setEnterPressAction(Action)setEnterPressAction(Action)void setEnterPressAction(Action action)
If such action is not set, the table responds to pressing Enter by trying to find and execute the following actions:
setItemClickAction(Action)shortcut propertyIf one of these actions is found and it is enabled, it is executed.
action - an action to be executed on Enter key presssetItemClickAction(Action)int getFrozenColumnCount()
NOTE: this count includes hidden
columns in the count.
setFrozenColumnCount(int)void setFrozenColumnCount(int numberOfColumns)
The default value is 0.
numberOfColumns - the number of columns that should be frozenjava.lang.IllegalArgumentException - if the column count is < 0 or > the number of visible columnsboolean isSortable()
true if individual column sortable
attribute can be set to true, false otherwisevoid setSortable(boolean sortable)
true.sortable - true if individual column sortable
attribute can be set to true, false otherwiseboolean isColumnsCollapsingAllowed()
true if individual column collapsible attribute
can be set to true, false otherwisevoid setColumnsCollapsingAllowed(boolean columnsCollapsingAllowed)
true.columnsCollapsingAllowed - true if individual column collapsible attribute
can be set to true, false otherwiseboolean isEditorEnabled()
true if the editor is enabled for this gridsetEditorEnabled(boolean),
getEditedItemId()void setEditorEnabled(boolean isEnabled)
edit(Entity) method.isEnabled - true to enable the feature, false otherwisegetEditedItemId()boolean isEditorBuffered()
true if buffered editor is enabled, false otherwisevoid setEditorBuffered(boolean editorBuffered)
true).editorBuffered - true to enable buffered editor, false to disable itjava.lang.String getEditorSaveCaption()
void setEditorSaveCaption(java.lang.String saveCaption)
saveCaption - the caption to setjava.lang.String getEditorCancelCaption()
void setEditorCancelCaption(java.lang.String cancelCaption)
cancelCaption - the caption to set@Nullable java.lang.Object getEditedItemId()
null if no item is being edited at the momentboolean isEditorActive()
true if the editor is open@Deprecated void editItem(java.lang.Object itemId)
edit(Entity)itemId - the id of the item to editjava.lang.IllegalStateException - if the editor is not enabled or already editing an item in buffered modejava.lang.IllegalArgumentException - if datasource doesn't contain item with given idsetEditorEnabled(boolean)void edit(E entity)
entity - the entity to editjava.lang.IllegalStateException - if the editor is not enabled or already editing an entity in buffered modejava.lang.IllegalArgumentException - if datasource doesn't contain the entitysetEditorEnabled(boolean)void addEditorPreCommitListener(DataGrid.EditorPreCommitListener listener)
listener - the listener to registervoid removeEditorPreCommitListener(DataGrid.EditorPreCommitListener listener)
listener - the listener to removevoid addEditorPostCommitListener(DataGrid.EditorPostCommitListener listener)
listener - the listener to registervoid removeEditorPostCommitListener(DataGrid.EditorPostCommitListener listener)
listener - the listener to removevoid addEditorCloseListener(DataGrid.EditorCloseListener listener)
listener - the listener to registervoid removeEditorCloseListener(DataGrid.EditorCloseListener listener)
listener - the listener to removevoid addEditorOpenListener(DataGrid.EditorOpenListener listener)
listener - the listener to registervoid removeEditorOpenListener(DataGrid.EditorOpenListener listener)
listener - the listener to removevoid repaint()
void scrollTo(E item)
DataGrid.ScrollDestination.ANY.item - item to scroll toscrollTo(Entity, ScrollDestination),
scrollToStart(),
scrollToEnd()void scrollTo(E item, DataGrid.ScrollDestination destination)
item - item to scroll todestination - value specifying desired position of scrolled-to rowscrollTo(Entity),
scrollToStart(),
scrollToEnd()void scrollToStart()
void scrollToEnd()
DataGrid.ColumnResizeMode getColumnResizeMode()
DataGrid.ColumnResizeMode.ANIMATED.void setColumnResizeMode(DataGrid.ColumnResizeMode mode)
DataGrid.ColumnResizeMode.ANIMATED.mode - a ColumnResizeMode valueDataGrid.SelectionMode getSelectionMode()
DataGrid.SelectionModevoid setSelectionMode(DataGrid.SelectionMode selectionMode)
selectionMode - the selection mode to usevoid addRowStyleProvider(DataGrid.RowStyleProvider<? super E> styleProvider)
DataGrid can use several providers to obtain many style names for rows.
void removeRowStyleProvider(DataGrid.RowStyleProvider<? super E> styleProvider)
void addCellStyleProvider(DataGrid.CellStyleProvider<? super E> styleProvider)
DataGrid can use several providers to obtain many style names for cells.
void removeCellStyleProvider(DataGrid.CellStyleProvider<? super E> styleProvider)
DataGrid.CellDescriptionProvider getCellDescriptionProvider()
CellDescriptionProvider instance used to generate
descriptions (tooltips) for DataGrid cells.null if no provider is setvoid setCellDescriptionProvider(DataGrid.CellDescriptionProvider<E> provider)
CellDescriptionProvider instance for generating
optional descriptions (tooltips) for individual DataGrid cells. If a
DataGrid.RowDescriptionProvider is also set, the row description it
generates is displayed for cells for which provider returns null.provider - the description provider to use or null to remove a
previously set provider if anyDataGrid.RowDescriptionProvider getRowDescriptionProvider()
RowDescriptionProvider instance used to generate
descriptions (tooltips) for DataGrid rowsvoid setRowDescriptionProvider(DataGrid.RowDescriptionProvider<E> provider)
RowDescriptionProvider instance for generating
optional descriptions (tooltips) for DataGrid rows. If a
DataGrid.CellDescriptionProvider is also set, the row description
generated by provider is used for cells for which the cell
description provider returns null.provider - the description provider to use or null to remove a
previously set provider if anyDataGrid.Column addGeneratedColumn(java.lang.String columnId, DataGrid.ColumnGenerator<E,?> generator)
columnId - column identifier as defined in XML descriptorgenerator - column generator instanceaddGeneratedColumn(String, ColumnGenerator, int)DataGrid.Column addGeneratedColumn(java.lang.String columnId, DataGrid.ColumnGenerator<E,?> generator, int index)
columnId - column identifier as defined in XML descriptorgenerator - column generator instanceindex - index of a new generated columnaddGeneratedColumn(String, ColumnGenerator)DataGrid.ColumnGenerator<E,?> getColumnGenerator(java.lang.String columnId)
columnId - the column id for which to return column generator@Nullable DataGrid.DetailsGenerator<E> getDetailsGenerator()
null if not setvoid setDetailsGenerator(DataGrid.DetailsGenerator<E> detailsGenerator)
The currently opened row details will be re-rendered.
detailsGenerator - the details generator to setboolean isDetailsVisible(Entity entity)
entity - the item for which to check details visibilitytrue if the details are visiblevoid setDetailsVisible(Entity entity, boolean visible)
entity - the item for which to set details visibilityvisible - true to show the details, or false to hide them<T extends DataGrid.Renderer> T createRenderer(java.lang.Class<T> type)
type - renderer typevoid addColumnCollapsingChangeListener(DataGrid.ColumnCollapsingChangeListener listener)
listener - the listener to registervoid removeColumnCollapsingChangeListener(DataGrid.ColumnCollapsingChangeListener listener)
listener - the listener to removevoid addColumnReorderListener(DataGrid.ColumnReorderListener listener)
listener - the listener to registervoid removeColumnReorderListener(DataGrid.ColumnReorderListener listener)
listener - the listener to removevoid addColumnResizeListener(DataGrid.ColumnResizeListener listener)
listener - the listener to registervoid removeColumnResizeListener(DataGrid.ColumnResizeListener listener)
listener - the listener to removevoid addSelectionListener(DataGrid.SelectionListener<E> listener)
listener - the listener to registervoid removeSelectionListener(DataGrid.SelectionListener<E> listener)
listener - the listener to removevoid addSortListener(DataGrid.SortListener listener)
listener - the listener to registervoid removeSortListener(DataGrid.SortListener listener)
listener - the listener to removevoid addContextClickListener(DataGrid.ContextClickListener listener)
listener - the listener to registervoid removeContextClickListener(DataGrid.ContextClickListener listener)
listener - the listener to removevoid addItemClickListener(DataGrid.ItemClickListener<E> listener)
listener - the listener to registervoid removeItemClickListener(DataGrid.ItemClickListener<E> listener)
listener - the listener to removeDataGrid.HeaderRow getHeaderRow(int index)
index - 0 based index for row. Counted from top to bottomDataGrid.HeaderRow appendHeaderRow()
prependHeaderRow(),
addHeaderRowAt(int),
removeHeaderRow(HeaderRow),
removeHeaderRow(int)DataGrid.HeaderRow prependHeaderRow()
appendHeaderRow(),
addHeaderRowAt(int),
removeHeaderRow(HeaderRow),
removeHeaderRow(int)DataGrid.HeaderRow addHeaderRowAt(int index)
index - the position at which to insert the rowappendHeaderRow(),
prependHeaderRow(),
removeHeaderRow(HeaderRow),
removeHeaderRow(int)void removeHeaderRow(DataGrid.HeaderRow headerRow)
headerRow - the row to be removedremoveHeaderRow(int),
addHeaderRowAt(int),
appendHeaderRow(),
prependHeaderRow()void removeHeaderRow(int index)
index - the position of the rowremoveHeaderRow(HeaderRow),
addHeaderRowAt(int),
appendHeaderRow(),
prependHeaderRow()DataGrid.HeaderRow getDefaultHeaderRow()
void setDefaultHeaderRow(DataGrid.HeaderRow headerRow)
headerRow - the new default row, or null for no default rowint getHeaderRowCount()
DataGrid.FooterRow getFooterRow(int index)
index - 0 based index for row. Counted from top to bottomDataGrid.FooterRow appendFooterRow()
prependFooterRow(),
addFooterRowAt(int),
removeFooterRow(FooterRow),
removeFooterRow(int)DataGrid.FooterRow prependFooterRow()
appendFooterRow(),
addFooterRowAt(int),
removeFooterRow(FooterRow),
removeFooterRow(int)DataGrid.FooterRow addFooterRowAt(int index)
index - the position at which to insert the rowappendFooterRow(),
prependFooterRow(),
removeFooterRow(FooterRow),
removeFooterRow(int)void removeFooterRow(DataGrid.FooterRow footerRow)
footerRow - the row to be removedremoveFooterRow(int),
addFooterRowAt(int),
appendFooterRow(),
prependFooterRow()void removeFooterRow(int index)
index - the position of the rowremoveFooterRow(FooterRow),
addFooterRowAt(int),
appendFooterRow(),
prependFooterRow()int getFooterRowCount()