public abstract class AbstractDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>,E> extends AbstractComponent<C> implements DataGrid<E>, SecuredActionsHolder, LookupComponent.LookupSelectionChangeNotifier<E>, DataGridItemsEventsDelegate<E>, HasInnerComponents, org.springframework.beans.factory.InitializingBean
Modifier and Type | Class and Description |
---|---|
static class |
AbstractDataGrid.AbstractRenderer<T,V> |
protected static class |
AbstractDataGrid.AbstractStaticCellImpl |
protected static class |
AbstractDataGrid.AbstractStaticRowImp<T extends DataGrid.StaticCell> |
static class |
AbstractDataGrid.ActionMenuItemWrapper |
protected class |
AbstractDataGrid.CellDescriptionGeneratorAdapter<T extends E> |
protected class |
AbstractDataGrid.CellStyleGeneratorAdapter<T extends E> |
protected static class |
AbstractDataGrid.ColumnImpl<E> |
protected static class |
AbstractDataGrid.DataGridEditorCustomField<T> |
protected static class |
AbstractDataGrid.DataGridEditorFieldFactoryAdapter<E> |
protected static class |
AbstractDataGrid.FooterCellImpl |
protected static class |
AbstractDataGrid.FooterRowImpl |
protected static class |
AbstractDataGrid.GridComposition |
protected static class |
AbstractDataGrid.HeaderCellImpl |
protected static class |
AbstractDataGrid.HeaderRowImpl |
DataGrid.AbstractDataGridEditorEvent<E>, DataGrid.AbstractDataGridEvent, DataGrid.AggregationPosition, DataGrid.ButtonRenderer<T>, DataGrid.CheckBoxRenderer, DataGrid.ClickableTextRenderer<T>, DataGrid.Column<E>, DataGrid.ColumnCollapsingChangeEvent, DataGrid.ColumnGeneratorEvent<E>, DataGrid.ColumnReorderEvent, DataGrid.ColumnResizeEvent, DataGrid.ColumnResizeMode, DataGrid.ComponentRenderer, DataGrid.ContextClickEvent, DataGrid.DataGridClickEvent, DataGrid.DataGridStaticCellType, DataGrid.DateRenderer, DataGrid.EditorCloseEvent<E>, DataGrid.EditorFieldGenerationContext<T>, DataGrid.EditorOpenEvent<E>, DataGrid.EditorPostCommitEvent<E>, DataGrid.EditorPreCommitEvent<E>, DataGrid.EmptyStateClickEvent<E>, DataGrid.FooterCell, DataGrid.FooterRow, DataGrid.HasDateTimeFormatter, DataGrid.HasFormatString, DataGrid.HasLocale, DataGrid.HasNullRepresentation, DataGrid.HasRendererClickListener<T>, DataGrid.HeaderCell, DataGrid.HeaderRow, DataGrid.HtmlRenderer, DataGrid.IconRenderer<T>, DataGrid.ImageRenderer<T>, DataGrid.ItemClickEvent<E>, DataGrid.LocalDateRenderer, DataGrid.LocalDateTimeRenderer, DataGrid.NumberRenderer, DataGrid.ProgressBarRenderer, DataGrid.Renderer, DataGrid.RendererClickEvent<T>, DataGrid.ScrollDestination, DataGrid.SelectionEvent<E>, DataGrid.SelectionMode, DataGrid.SortDirection, DataGrid.SortEvent, DataGrid.SortOrder, DataGrid.StaticCell, DataGrid.StaticRow<T extends DataGrid.StaticCell>, DataGrid.TextRenderer
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
LookupComponent.LookupSelectionChangeEvent<T>, LookupComponent.LookupSelectionChangeNotifier<T>
Modifier and Type | Field and Description |
---|---|
protected io.jmix.core.AccessManager |
accessManager |
protected java.util.List<Action> |
actionList |
protected Actions |
actions |
protected ActionsPermissions |
actionsPermissions |
protected AggregatableDelegate<java.lang.Object> |
aggregatableDelegate |
protected Aggregations |
aggregations |
protected ButtonsPanel |
buttonsPanel |
protected com.vaadin.shared.Registration |
columnCollapsingChangeListenerRegistration |
protected java.util.Map<java.lang.String,java.util.function.Function<DataGrid.ColumnGeneratorEvent<E>,?>> |
columnGenerators |
protected com.vaadin.shared.Registration |
columnResizeListenerRegistration |
protected java.util.Map<java.lang.String,DataGrid.Column<E>> |
columns |
protected boolean |
columnsCollapsingAllowed |
protected java.util.List<DataGrid.Column<E>> |
columnsOrder |
protected AbstractDataGrid.GridComposition |
componentComposition |
protected com.vaadin.shared.Registration |
contextClickListenerRegistration |
protected JmixGridContextMenu<E> |
contextMenu |
protected java.util.List<AbstractDataGrid.ActionMenuItemWrapper> |
contextMenuItems |
protected DataGridDataProvider<E> |
dataBinding |
protected java.util.function.Function<E,Component> |
detailsGenerator |
protected com.vaadin.shared.Registration |
editorBeforeSaveListener |
protected com.vaadin.shared.Registration |
editorCancelListener |
protected boolean |
editorCrossFieldValidate |
protected com.vaadin.shared.Registration |
editorOpenListener |
protected com.vaadin.shared.Registration |
editorSaveListener |
protected java.util.function.Consumer<DataGrid.EmptyStateClickEvent<E>> |
emptyStateClickEventHandler |
protected Action |
enterPressAction |
protected com.vaadin.ui.components.grid.FooterRow |
footerAggregationRow |
protected java.util.List<DataGrid.FooterRow> |
footerRows |
protected static java.lang.String |
HAS_TOP_PANEL_STYLE_NAME |
protected com.vaadin.ui.components.grid.HeaderRow |
headerAggregationRow |
protected java.util.List<DataGrid.HeaderRow> |
headerRows |
protected IconResolver |
iconResolver |
protected java.util.List<java.lang.String> |
internalStyles |
protected Action |
itemClickAction |
protected java.util.Map<E,java.lang.Object> |
itemDatasources |
protected io.jmix.core.Messages |
messages |
protected io.jmix.core.MessageTools |
messageTools |
protected io.jmix.core.MetadataTools |
metadataTools |
protected PaginationComponent |
pagination |
protected java.util.function.Function<? super E,java.lang.String> |
rowDescriptionProvider |
protected java.util.List<java.util.function.Function<? super E,java.lang.String>> |
rowStyleProviders |
protected ScreenValidation |
screenValidation |
protected DataGrid.SelectionMode |
selectionMode |
protected ShortcutsDelegate<com.vaadin.event.ShortcutListener> |
shortcutsDelegate |
protected boolean |
showIconsForPopupMenuActions |
protected boolean |
sortable |
protected static java.lang.String |
TEXT_SELECTION_ENABLED_STYLE |
protected boolean |
textSelectionEnabled |
protected com.vaadin.ui.CssLayout |
topPanel |
protected UiTestIdsSupport |
uiTestIdsSupport |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
AbstractDataGrid() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
__aggregate() |
protected java.util.Map<java.lang.String,java.lang.Object> |
__aggregateValues() |
void |
addAction(Action action)
Add an action to the component
|
void |
addAction(Action action,
int index)
Add an action to the component with index.
|
void |
addColumn(DataGrid.Column<E> column)
Adds the given column to DataGrid.
|
void |
addColumn(DataGrid.Column<E> column,
int index)
Adds the given column at the specified index to DataGrid.
|
DataGrid.Column<E> |
addColumn(java.lang.String id,
io.jmix.core.metamodel.model.MetaPropertyPath propertyPath)
Creates new column with given Id and property, then adds this column to DataGrid.
|
DataGrid.Column<E> |
addColumn(java.lang.String id,
io.jmix.core.metamodel.model.MetaPropertyPath propertyPath,
int index)
Creates new column with given Id and property at the specified index,
then adds this column to DataGrid.
|
io.jmix.core.common.event.Subscription |
addColumnCollapsingChangeListener(java.util.function.Consumer<DataGrid.ColumnCollapsingChangeEvent> listener)
Registers a new column collapsing change listener.
|
protected void |
addColumnId(com.vaadin.ui.Grid.Column<E,?> gridColumn,
DataGrid.Column<E> column) |
protected void |
addColumnInternal(AbstractDataGrid.ColumnImpl<E> column,
int index) |
io.jmix.core.common.event.Subscription |
addColumnReorderListener(java.util.function.Consumer<DataGrid.ColumnReorderEvent> listener)
Registers a new column reorder listener.
|
io.jmix.core.common.event.Subscription |
addColumnResizeListener(java.util.function.Consumer<DataGrid.ColumnResizeEvent> listener)
Registers a new column resize listener.
|
io.jmix.core.common.event.Subscription |
addContextClickListener(java.util.function.Consumer<DataGrid.ContextClickEvent> listener)
Registers a new context click listener
|
io.jmix.core.common.event.Subscription |
addEditorCloseListener(java.util.function.Consumer<DataGrid.EditorCloseEvent<E>> listener)
Registers a new DataGrid editor close listener.
|
io.jmix.core.common.event.Subscription |
addEditorOpenListener(java.util.function.Consumer<DataGrid.EditorOpenEvent<E>> listener)
Registers a new DataGrid editor open listener.
|
io.jmix.core.common.event.Subscription |
addEditorPostCommitListener(java.util.function.Consumer<DataGrid.EditorPostCommitEvent<E>> listener)
Registers a new DataGrid editor post commit listener.
|
io.jmix.core.common.event.Subscription |
addEditorPreCommitListener(java.util.function.Consumer<DataGrid.EditorPreCommitEvent<E>> 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.
|
protected DataGrid.FooterRow |
addFooterRowInternal(com.vaadin.ui.components.grid.FooterRow footerRow) |
DataGrid.Column<E> |
addGeneratedColumn(java.lang.String columnId,
java.util.function.Function<DataGrid.ColumnGeneratorEvent<E>,?> generator)
Add a generated column to the DataGrid.
|
DataGrid.Column<E> |
addGeneratedColumn(java.lang.String columnId,
java.util.function.Function<DataGrid.ColumnGeneratorEvent<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.
|
protected DataGrid.HeaderRow |
addHeaderRowInternal(com.vaadin.ui.components.grid.HeaderRow headerRow) |
io.jmix.core.common.event.Subscription |
addItemClickListener(java.util.function.Consumer<DataGrid.ItemClickEvent<E>> listener)
Registers a new item click listener
|
io.jmix.core.common.event.Subscription |
addLookupValueChangeListener(java.util.function.Consumer<LookupComponent.LookupSelectionChangeEvent<E>> listener)
Adds a listener that invoked when lookup selected items set is changed.
|
void |
addRowStyleProvider(java.util.function.Function<? super E,java.lang.String> styleProvider)
Adds style provider for the DataGrid rows.
|
io.jmix.core.common.event.Subscription |
addSelectionListener(java.util.function.Consumer<DataGrid.SelectionEvent<E>> listener)
Registers a new selection listener
|
io.jmix.core.common.event.Subscription |
addSortListener(java.util.function.Consumer<DataGrid.SortEvent> listener)
Registers a new sort order change listener
|
void |
afterPropertiesSet() |
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.
|
protected void |
attachAction(Action action) |
protected int |
calculateFooterIndex(int index) |
protected boolean |
canBeSorted(DataGridItems<E> dataGridItems) |
protected void |
checkAggregation(AggregationInfo aggregationInfo) |
protected void |
checkHeaderIndexInRange(int index,
boolean includeBounds) |
protected void |
clearFieldDatasources(E item) |
protected <V> java.util.Map<java.lang.String,V> |
convertAggregationKeyMapToColumnIdKeyMap(java.util.Map<AggregationInfo,V> aggregationInfoMap) |
protected java.util.List<DataGrid.SortOrder> |
convertToDataGridSortOrder(java.util.List<com.vaadin.data.provider.GridSortOrder<E>> gridSortOrder) |
protected java.util.Map<java.lang.String,Field> |
convertToJmixFields(java.util.Map<com.vaadin.ui.Grid.Column<E,?>,com.vaadin.ui.Component> columnFieldMap) |
protected void |
copyColumnProperties(DataGrid.Column<E> column,
DataGrid.Column<E> existingColumn) |
protected AbstractDataGrid.ColumnImpl<E> |
createColumn(java.lang.String id,
io.jmix.core.metamodel.model.MetaPropertyPath propertyPath,
AbstractDataGrid<?,E> owner) |
protected abstract C |
createComponent() |
protected AbstractDataGrid.GridComposition |
createComponentComposition() |
protected AbstractDataGrid.ActionMenuItemWrapper |
createContextMenuItem(Action action) |
protected DataGridDataProvider<E> |
createDataGridDataProvider(DataGridItems<E> dataGridItems) |
protected JmixGridEditorFieldFactory<E> |
createEditorFieldFactory() |
protected com.vaadin.data.provider.DataProvider<E,?> |
createEmptyDataProvider() |
protected ShortcutListenerDelegate |
createEnterShortcutListener() |
protected com.vaadin.data.ValueProvider<E,java.lang.Object> |
createGeneratedColumnValueProvider(java.lang.String columnId,
java.util.function.Function<DataGrid.ColumnGeneratorEvent<E>,?> generator) |
protected InstanceContainer<E> |
createInstanceContainer(E item) |
protected ShortcutsDelegate<com.vaadin.event.ShortcutListener> |
createShortcutsDelegate() |
protected com.vaadin.ui.CssLayout |
createTopPanel() |
protected ValueSourceProvider |
createValueSourceProvider(E item) |
void |
dataGridSourceItemSetChanged(DataGridItems.ItemSetChangeEvent<E> event) |
void |
dataGridSourcePropertyValueChanged(DataGridItems.ValueChangeEvent<E> event) |
void |
dataGridSourceSelectedItemChanged(DataGridItems.SelectedItemChangeEvent<E> event) |
void |
dataGridSourceStateChanged(DataUnit.StateChangeEvent event) |
void |
deselect(E item)
Deselects the given item.
|
void |
deselectAll()
Deselects all the items in the current data source.
|
protected void |
detachItemContainer(java.lang.Object container) |
void |
edit(E item)
Opens the editor interface for the provided entity.
|
protected void |
editItemInternal(E item) |
protected void |
enableCrossFieldValidationHandling(boolean enable) |
protected void |
fillAggregationRow(java.util.Map<java.lang.String,java.lang.String> values) |
protected void |
fireSelectionEvent(com.vaadin.event.selection.SelectionEvent<E> e) |
void |
focus()
Sets focus to this component
|
protected java.lang.String |
generateColumnCaption(DataGrid.Column<E> column) |
Action |
getAction(java.lang.String id) |
java.util.Collection<Action> |
getActions() |
ActionsPermissions |
getActionsPermissions() |
protected AggregatableDelegate<java.lang.Object> |
getAggregatableDelegate() |
protected java.util.List<AggregationInfo> |
getAggregationInfos() |
DataGrid.AggregationPosition |
getAggregationPosition() |
java.util.Map<java.lang.String,java.lang.Object> |
getAggregationResults() |
protected java.util.Collection<io.jmix.core.metamodel.model.MetaPropertyPath> |
getAutowiredProperties(EntityDataGridItems<E> entityDataGridSource) |
double |
getBodyRowHeight()
Returns the current body row height.
|
ButtonsPanel |
getButtonsPanel() |
java.lang.String |
getCaption() |
DataGrid.Column<E> |
getColumn(java.lang.String id)
Returns a column based on the Id.
|
protected java.lang.String |
getColumnAggregationDescription(DataGrid.Column<E> column) |
protected java.lang.String |
getColumnAggregationDescriptionByType(DataGrid.Column<E> column) |
protected AbstractDataGrid.ColumnImpl<E> |
getColumnByGridColumn(com.vaadin.ui.Grid.Column<E,?> gridColumn) |
protected DataGrid.Column<E> |
getColumnById(java.lang.Object id) |
java.util.function.Function<DataGrid.ColumnGeneratorEvent<E>,?> |
getColumnGenerator(java.lang.String columnId)
Gets the columns generator for the given column id.
|
DataGrid.Column<E> |
getColumnNN(java.lang.String id)
Returns a column by its Id.
|
protected java.lang.String[] |
getColumnOrder() |
protected com.vaadin.data.ValueProvider |
getColumnPresentationValueProvider(DataGrid.Column<E> column) |
protected com.vaadin.ui.renderers.Renderer |
getColumnRendererImplementation(DataGrid.Column<E> column) |
DataGrid.ColumnResizeMode |
getColumnResizeMode()
Returns the current column resize mode.
|
java.util.List<DataGrid.Column<E>> |
getColumns()
Returns a copy of currently configured columns in their current visual
order in this DataGrid.
|
protected java.util.List<DataGrid.Column<E>> |
getColumnsOrderInternal() |
com.vaadin.ui.Component |
getComposition() |
protected DataGridItems<E> |
getDataGridItemsNN() |
DataGrid.HeaderRow |
getDefaultHeaderRow()
Returns the current default row of the header section.
|
protected com.vaadin.data.ValueProvider |
getDefaultPresentationValueProvider(DataGrid.Column<E> column) |
protected com.vaadin.ui.renderers.Renderer |
getDefaultRenderer(DataGrid.Column<E> column) |
java.util.function.Function<E,Component> |
getDetailsGenerator() |
E |
getEditedItem()
Returns 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.
|
java.util.function.Consumer<DataGrid.EmptyStateClickEvent<E>> |
getEmptyStateLinkClickHandler() |
java.lang.String |
getEmptyStateLinkMessage() |
java.lang.String |
getEmptyStateMessage() |
protected Action |
getEnterAction() |
Action |
getEnterPressAction() |
protected EntityDataGridItems<E> |
getEntityDataGridItems() |
protected EntityDataGridItems<E> |
getEntityDataGridItemsNN() |
DataGrid.FooterRow |
getFooterRow(int index)
Gets the footer row at given index.
|
protected DataGrid.FooterRow |
getFooterRowByGridRow(com.vaadin.ui.components.grid.FooterRow gridRow) |
int |
getFooterRowCount()
Gets the row count for the footer.
|
double |
getFooterRowHeight()
Returns the current footer row height.
|
int |
getFrozenColumnCount()
Gets the number of frozen columns in this DataGrid.
|
protected java.lang.String |
getGeneratedCellDescription(E item,
DataGrid.Column<E> column) |
protected java.lang.String |
getGeneratedCellStyle(E item,
DataGrid.Column<E> column) |
protected java.lang.String |
getGeneratedRowStyle(E item) |
DataGrid.HeaderRow |
getHeaderRow(int index)
Gets the header row at given index.
|
protected DataGrid.HeaderRow |
getHeaderRowByGridRow(com.vaadin.ui.components.grid.HeaderRow gridRow) |
int |
getHeaderRowCount()
Gets the row count for the header section.
|
double |
getHeaderRowHeight()
Returns the current header row height.
|
protected java.util.List<DataGrid.Column<E>> |
getInitialVisibleColumns() |
java.util.Collection<Component> |
getInnerComponents() |
Action |
getItemClickAction() |
DataGridItems<E> |
getItems() |
java.util.Collection<E> |
getLookupSelectedItems() |
PaginationComponent |
getPagination() |
protected java.lang.String |
getRowDescription(E item) |
java.util.function.Function<E,java.lang.String> |
getRowDescriptionProvider()
Returns the
RowDescriptionProvider instance used to generate
descriptions (tooltips) for DataGrid rows |
protected com.vaadin.ui.Component |
getRowDetails(E item) |
java.util.Set<E> |
getSelected()
Returns a set of entity instances corresponding to the selected rows of the list component.
|
DataGrid.SelectionMode |
getSelectionMode() |
E |
getSingleSelected()
Returns an instance of entity corresponding to the selected row of the list component.
|
java.util.List<DataGrid.SortOrder> |
getSortOrder() |
int |
getTabIndex()
Gets the tabulator index of the
HasTabIndex component. |
java.util.List<DataGrid.Column<E>> |
getVisibleColumns()
Returns a copy of columns not hidden by security permissions.
|
protected void |
handleDoubleClickAction() |
protected void |
initAggregationRow() |
protected void |
initComponent(com.vaadin.ui.Grid<E> component) |
protected void |
initComponentComposition(AbstractDataGrid.GridComposition componentComposition) |
protected void |
initContextMenu() |
protected void |
initEditor(com.vaadin.ui.Grid<E> component) |
protected void |
initEmptyState() |
protected void |
initFooterRows(com.vaadin.ui.Grid<E> component) |
protected void |
initHeaderRows(com.vaadin.ui.Grid<E> component) |
protected void |
initSidebarMenu() |
protected void |
internalRemoveColumnCollapsingChangeListener(java.util.function.Consumer<DataGrid.ColumnCollapsingChangeEvent> listener) |
protected void |
internalRemoveColumnResizeListener(java.util.function.Consumer<DataGrid.ColumnResizeEvent> listener) |
protected void |
internalRemoveContextClickListener(java.util.function.Consumer<DataGrid.ContextClickEvent> listener) |
protected void |
internalRemoveEditorCloseListener(java.util.function.Consumer<DataGrid.EditorCloseEvent<E>> listener) |
protected void |
internalRemoveEditorOpenListener(java.util.function.Consumer<DataGrid.EditorOpenEvent<E>> listener) |
protected void |
internalRemoveEditorPostCommitListener(java.util.function.Consumer<DataGrid.EditorPostCommitEvent<E>> listener) |
protected void |
internalRemoveEditorPreCommitListener(java.util.function.Consumer<DataGrid.EditorPreCommitEvent<E>> listener) |
boolean |
isAggregatable() |
boolean |
isCaptionAsHtml() |
boolean |
isColumnReorderingAllowed()
Returns whether column reordering is allowed.
|
boolean |
isColumnsCollapsingAllowed() |
boolean |
isContextMenuEnabled() |
boolean |
isDetailsVisible(E 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 |
isEditorCrossFieldValidate() |
boolean |
isEditorEnabled()
Checks whether the item editor UI is enabled for this DataGrid.
|
boolean |
isFooterVisible()
Returns the visibility of the footer section.
|
boolean |
isHeaderVisible()
Returns the visibility of the header section.
|
boolean |
isMultiSelect() |
boolean |
isSortable() |
boolean |
isTextSelectionEnabled() |
protected void |
onBeforeRefreshGridData(E item) |
protected void |
onColumnReorder(com.vaadin.ui.Grid.ColumnReorderEvent e) |
protected void |
onColumnResize(com.vaadin.ui.Grid.ColumnResizeEvent e) |
protected void |
onColumnVisibilityChanged(com.vaadin.ui.Grid.ColumnVisibilityChangeEvent e) |
protected void |
onContextClick(com.vaadin.event.ContextClickEvent e) |
protected void |
onEditorBeforeSave(JmixEditorBeforeSaveEvent<E> event) |
protected void |
onEditorCancel(com.vaadin.ui.components.grid.EditorCancelEvent<E> cancelEvent) |
protected void |
onEditorOpen(com.vaadin.ui.components.grid.EditorOpenEvent<E> editorOpenEvent) |
protected void |
onEditorSave(com.vaadin.ui.components.grid.EditorSaveEvent<E> saveEvent) |
protected void |
onItemClick(com.vaadin.ui.Grid.ItemClick<E> e) |
protected void |
onPaginationAfterRefresh(PaginationComponent.AfterRefreshEvent event) |
protected void |
onSelectionChange(com.vaadin.event.selection.SelectionEvent<E> e) |
protected void |
onSort(com.vaadin.event.SortEvent<com.vaadin.data.provider.GridSortOrder<E>> e) |
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.
|
protected void |
refreshActionsState() |
void |
removeAction(Action action)
Remove the action from the component
|
void |
removeAction(java.lang.String id)
Remove the action by its ID.
|
protected void |
removeAggregationRow() |
void |
removeAllActions()
Remove all actions from the component
|
void |
removeColumn(DataGrid.Column<E> 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.
|
protected void |
removeColumnId(com.vaadin.ui.Grid.Column<E,?> gridColumn) |
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 |
removeRowStyleProvider(java.util.function.Function<? super E,java.lang.String> styleProvider)
Removes style provider for the DataGrid rows.
|
void |
repaint()
Repaint UI representation of the DataGrid without refreshing the table data.
|
protected java.util.List<DataGrid.Column<E>> |
restoreColumnsOrder(java.util.List<DataGrid.Column<E>> visibleColumns)
Inserts columns hidden by security permissions (or with visible = false,
which means that where is no Grid.Column associated with DatGrid.Column)
into a list of visible columns, passed as a parameter, in they original positions.
|
protected void |
restoreColumnsOrderAndUpdate(java.util.List<DataGrid.Column<E>> visibleColumns) |
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 source as selected.
|
void |
setAccessManager(io.jmix.core.AccessManager accessManager) |
void |
setActions(Actions actions) |
void |
setAggregatable(boolean aggregatable)
Set to true if aggregation should be enabled.
|
void |
setAggregationPosition(DataGrid.AggregationPosition position)
Sets aggregation row position.
|
void |
setAggregations(Aggregations aggregations) |
void |
setBodyRowHeight(double rowHeight)
Sets the height of a body row.
|
void |
setButtonsPanel(ButtonsPanel panel)
Sets a
ButtonsPanel component. |
void |
setCaption(java.lang.String caption)
Sets the component's caption.
|
void |
setCaptionAsHtml(boolean captionAsHtml)
Sets whether the caption is rendered as HTML.
|
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 |
setDebugId(java.lang.String id)
INTERNAL.
|
void |
setDefaultHeaderRow(DataGrid.HeaderRow headerRow)
Sets the default row of the header.
|
void |
setDetailsGenerator(java.util.function.Function<E,Component> detailsGenerator)
Sets a new details generator for row details.
|
void |
setDetailsVisible(E 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 |
setEditorCrossFieldValidate(boolean validate)
Enables cross field validation in the inline 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 |
setEmptyStateLinkClickHandler(java.util.function.Consumer<DataGrid.EmptyStateClickEvent<E>> handler)
Sets click handler for link message.
|
void |
setEmptyStateLinkMessage(java.lang.String linkMessage)
Sets a link message to the middle of DataGrid body that should be appeared when DataGrid is empty.
|
void |
setEmptyStateMessage(java.lang.String message)
Sets a message to the middle of DataGrid body that should be appeared when DataGrid is empty.
|
void |
setEnterPressAction(Action action)
Assigns an action to be executed on Enter key press.
|
void |
setFooterRowHeight(double rowHeight)
Sets the body of a footer row.
|
void |
setFooterVisible(boolean footerVisible)
Sets the visibility of the footer section.
|
void |
setFrozenColumnCount(int numberOfColumns)
Sets the number of frozen columns in this grid.
|
void |
setHeaderRowHeight(double rowHeight)
Sets the body of a body row.
|
void |
setHeaderVisible(boolean headerVisible)
Sets the visibility of the header section.
|
void |
setIconResolver(IconResolver iconResolver) |
void |
setId(java.lang.String id)
Set component ID
|
void |
setItemClickAction(Action action)
Assigns an action to be executed on double click on a DataGrid row.
|
void |
setItems(DataGridItems<E> dataGridItems)
Sets an instance of
DataGridItems as the DataGrid data source. |
void |
setLookupSelectHandler(java.util.function.Consumer<java.util.Collection<E>> selectHandler) |
void |
setMessages(io.jmix.core.Messages messages) |
void |
setMessageTools(io.jmix.core.MessageTools messageTools) |
void |
setMetadataTools(io.jmix.core.MetadataTools metadataTools) |
void |
setPagination(PaginationComponent pagination)
Sets pagination component.
|
void |
setRowDescriptionProvider(java.util.function.Function<? super E,java.lang.String> provider)
Sets the
RowDescriptionProvider instance for generating
optional descriptions (tooltips) for DataGrid rows. |
void |
setRowDescriptionProvider(java.util.function.Function<? super E,java.lang.String> provider,
ContentMode contentMode)
Sets the
RowDescriptionProvider instance for generating
optional descriptions (tooltips) for DataGrid rows. |
protected void |
setScreenValidation(ScreenValidation screenValidation) |
void |
setSelected(java.util.Collection<E> items)
Selects the rows of the list component for a given collection of entity instances.
|
void |
setSelected(E item)
Selects a row of the list component for a given entity instance.
|
protected void |
setSelectedItems(java.util.Collection<E> items) |
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 |
setStyleName(java.lang.String name)
Sets one or more style names of the component, replacing any
previous styles.
|
void |
setTabIndex(int tabIndex)
Sets the tabulator index of the
Focusable component. |
void |
setTextSelectionEnabled(boolean textSelectionEnabled)
Enable or disable text selection in DataGrid cells.
|
void |
setThemeConstantsManager(ThemeConstantsManager themeConstantsManager) |
protected void |
setUiTestId(DataGridItems<E> items) |
void |
setUiTestIdsSupport(UiTestIdsSupport uiTestIdsSupport) |
protected void |
setupAutowiredColumns(EntityDataGridItems<E> entityDataGridSource) |
protected void |
setupGridColumnProperties(com.vaadin.ui.Grid.Column<E,?> gridColumn,
DataGrid.Column<E> column) |
void |
setupPaginationDataSourceProvider() |
protected void |
setVisibleColumns(java.util.List<DataGrid.Column<E>> visibleColumnsOrder) |
protected void |
showEmptyStateIfPossible() |
void |
sort(java.lang.String columnId,
DataGrid.SortDirection direction)
Sorts the DataGrid data for passed column id in the chosen sort direction.
|
protected void |
updateAggregationRow() |
protected void |
updateCompositionStylesTopPanelVisible() |
protected java.lang.String |
validateCrossFieldRules(java.util.Map<java.lang.String,java.lang.Object> properties) |
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getComponent, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setParent, setResponsive, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSubPart, of
getFrame, setFrame
getActionNN
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setParent, setResponsive, setSizeAuto, setSizeFull, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isFocusable, setFocusable
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
protected static final java.lang.String HAS_TOP_PANEL_STYLE_NAME
protected static final java.lang.String TEXT_SELECTION_ENABLED_STYLE
protected io.jmix.core.MetadataTools metadataTools
protected io.jmix.core.AccessManager accessManager
protected io.jmix.core.Messages messages
protected io.jmix.core.MessageTools messageTools
protected ScreenValidation screenValidation
protected Actions actions
protected IconResolver iconResolver
protected Aggregations aggregations
protected AggregatableDelegate<java.lang.Object> aggregatableDelegate
protected UiTestIdsSupport uiTestIdsSupport
protected final java.util.List<java.lang.String> internalStyles
protected final java.util.Map<java.lang.String,DataGrid.Column<E>> columns
protected java.util.List<DataGrid.Column<E>> columnsOrder
protected final java.util.Map<java.lang.String,java.util.function.Function<DataGrid.ColumnGeneratorEvent<E>,?>> columnGenerators
protected final java.util.List<Action> actionList
protected final ShortcutsDelegate<com.vaadin.event.ShortcutListener> shortcutsDelegate
protected final ActionsPermissions actionsPermissions
protected JmixGridContextMenu<E> contextMenu
protected final java.util.List<AbstractDataGrid.ActionMenuItemWrapper> contextMenuItems
protected boolean sortable
protected boolean columnsCollapsingAllowed
protected boolean textSelectionEnabled
protected boolean editorCrossFieldValidate
protected Action itemClickAction
protected Action enterPressAction
protected DataGrid.SelectionMode selectionMode
protected AbstractDataGrid.GridComposition componentComposition
protected com.vaadin.ui.CssLayout topPanel
protected ButtonsPanel buttonsPanel
protected PaginationComponent pagination
protected java.util.List<java.util.function.Function<? super E,java.lang.String>> rowStyleProviders
protected java.util.function.Function<? super E,java.lang.String> rowDescriptionProvider
protected com.vaadin.shared.Registration columnCollapsingChangeListenerRegistration
protected com.vaadin.shared.Registration columnResizeListenerRegistration
protected com.vaadin.shared.Registration contextClickListenerRegistration
protected com.vaadin.shared.Registration editorCancelListener
protected com.vaadin.shared.Registration editorOpenListener
protected com.vaadin.shared.Registration editorBeforeSaveListener
protected com.vaadin.shared.Registration editorSaveListener
protected final java.util.List<DataGrid.HeaderRow> headerRows
protected final java.util.List<DataGrid.FooterRow> footerRows
protected com.vaadin.ui.components.grid.HeaderRow headerAggregationRow
protected com.vaadin.ui.components.grid.FooterRow footerAggregationRow
protected boolean showIconsForPopupMenuActions
protected DataGridDataProvider<E> dataBinding
protected java.util.Map<E,java.lang.Object> itemDatasources
protected java.util.function.Consumer<DataGrid.EmptyStateClickEvent<E>> emptyStateClickEventHandler
protected AbstractDataGrid.GridComposition createComponentComposition()
protected abstract C createComponent()
protected ShortcutsDelegate<com.vaadin.event.ShortcutListener> createShortcutsDelegate()
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
@Autowired public void setMetadataTools(io.jmix.core.MetadataTools metadataTools)
@Autowired public void setAccessManager(io.jmix.core.AccessManager accessManager)
@Autowired public void setMessages(io.jmix.core.Messages messages)
@Autowired public void setMessageTools(io.jmix.core.MessageTools messageTools)
@Autowired public void setThemeConstantsManager(ThemeConstantsManager themeConstantsManager)
@Autowired protected void setScreenValidation(ScreenValidation screenValidation)
@Autowired public void setActions(Actions actions)
@Autowired public void setIconResolver(IconResolver iconResolver)
@Autowired public void setAggregations(Aggregations aggregations)
@Autowired public void setUiTestIdsSupport(UiTestIdsSupport uiTestIdsSupport)
protected void initComponent(com.vaadin.ui.Grid<E> component)
protected void onBeforeRefreshGridData(E item)
protected JmixGridEditorFieldFactory<E> createEditorFieldFactory()
protected void initComponentComposition(AbstractDataGrid.GridComposition componentComposition)
protected void onItemClick(com.vaadin.ui.Grid.ItemClick<E> e)
protected void onColumnReorder(com.vaadin.ui.Grid.ColumnReorderEvent e)
protected void onSort(com.vaadin.event.SortEvent<com.vaadin.data.provider.GridSortOrder<E>> e)
protected void onSelectionChange(com.vaadin.event.selection.SelectionEvent<E> e)
protected void fireSelectionEvent(com.vaadin.event.selection.SelectionEvent<E> e)
protected ShortcutListenerDelegate createEnterShortcutListener()
public java.util.Collection<Component> getInnerComponents()
getInnerComponents
in interface HasInnerComponents
protected void initEditor(com.vaadin.ui.Grid<E> component)
protected void initHeaderRows(com.vaadin.ui.Grid<E> component)
protected void initFooterRows(com.vaadin.ui.Grid<E> component)
protected java.util.List<DataGrid.Column<E>> getColumnsOrderInternal()
protected java.util.List<DataGrid.Column<E>> restoreColumnsOrder(java.util.List<DataGrid.Column<E>> visibleColumns)
visibleColumns
- the list of DataGrid columns,
not hidden by security permissionsprotected void restoreColumnsOrderAndUpdate(java.util.List<DataGrid.Column<E>> visibleColumns)
protected void initContextMenu()
protected void initSidebarMenu()
protected void refreshActionsState()
protected void handleDoubleClickAction()
public void focus()
Component.Focusable
focus
in interface Component.Focusable
public void setLookupSelectHandler(java.util.function.Consumer<java.util.Collection<E>> selectHandler)
setLookupSelectHandler
in interface LookupComponent<E>
selectHandler
- handler that should be executed when a user select an item in the lookup screenpublic java.util.Collection<E> getLookupSelectedItems()
getLookupSelectedItems
in interface LookupComponent<E>
@Nullable protected Action getEnterAction()
public java.util.List<DataGrid.Column<E>> getColumns()
DataGrid
getColumns
in interface DataGrid<E>
DataGrid.getVisibleColumns()
public java.util.List<DataGrid.Column<E>> getVisibleColumns()
DataGrid
getVisibleColumns
in interface DataGrid<E>
DataGrid.getColumns()
@Nullable public DataGrid.Column<E> getColumn(java.lang.String id)
DataGrid
getColumn
in interface DataGrid<E>
id
- the column Idnull
if not foundDataGrid.getColumnNN(String)
public DataGrid.Column<E> getColumnNN(java.lang.String id)
DataGrid
getColumnNN
in interface DataGrid<E>
id
- the column IdDataGrid.getColumn(String)
public void addColumn(DataGrid.Column<E> column)
DataGrid
addColumn
in interface DataGrid<E>
column
- the column to addDataGrid.addColumn(Column, int)
,
DataGrid.addColumn(String, MetaPropertyPath)
,
DataGrid.addColumn(String, MetaPropertyPath, int)
public void addColumn(DataGrid.Column<E> column, int index)
DataGrid
addColumn
in interface DataGrid<E>
column
- the column to addindex
- index of a new columnDataGrid.addColumn(Column)
,
DataGrid.addColumn(String, MetaPropertyPath)
,
DataGrid.addColumn(String, MetaPropertyPath, int)
public DataGrid.Column<E> addColumn(java.lang.String id, @Nullable io.jmix.core.metamodel.model.MetaPropertyPath propertyPath)
DataGrid
addColumn
in interface DataGrid<E>
id
- the column IdpropertyPath
- the instance of MetaPropertyPath
representing a relative path
to a property from certain MetaClassDataGrid.addColumn(Column)
,
DataGrid.addColumn(Column, int)
,
DataGrid.addColumn(String, MetaPropertyPath, int)
public DataGrid.Column<E> addColumn(java.lang.String id, @Nullable io.jmix.core.metamodel.model.MetaPropertyPath propertyPath, int index)
DataGrid
addColumn
in interface DataGrid<E>
id
- the column IdpropertyPath
- the instance of MetaPropertyPath
representing a relative path
to a property from certain MetaClassindex
- index of a new columnDataGrid.addColumn(Column)
,
DataGrid.addColumn(Column, int)
,
DataGrid.addColumn(String, MetaPropertyPath)
protected AbstractDataGrid.ColumnImpl<E> createColumn(java.lang.String id, @Nullable io.jmix.core.metamodel.model.MetaPropertyPath propertyPath, AbstractDataGrid<?,E> owner)
protected void addColumnInternal(AbstractDataGrid.ColumnImpl<E> column, int index)
protected java.lang.String generateColumnCaption(DataGrid.Column<E> column)
protected void setupGridColumnProperties(com.vaadin.ui.Grid.Column<E,?> gridColumn, DataGrid.Column<E> column)
@Nullable protected com.vaadin.data.ValueProvider getColumnPresentationValueProvider(DataGrid.Column<E> column)
protected com.vaadin.data.ValueProvider getDefaultPresentationValueProvider(DataGrid.Column<E> column)
protected com.vaadin.ui.renderers.Renderer getColumnRendererImplementation(DataGrid.Column<E> column)
protected com.vaadin.ui.renderers.Renderer getDefaultRenderer(DataGrid.Column<E> column)
protected void addColumnId(com.vaadin.ui.Grid.Column<E,?> gridColumn, DataGrid.Column<E> column)
protected void removeColumnId(com.vaadin.ui.Grid.Column<E,?> gridColumn)
public void removeColumn(@Nullable DataGrid.Column<E> column)
DataGrid
null
.removeColumn
in interface DataGrid<E>
column
- the column to addDataGrid.removeColumn(String)
public void removeColumn(java.lang.String id)
DataGrid
removeColumn
in interface DataGrid<E>
id
- the columns IdDataGrid.removeColumn(Column)
@Nullable public DataGridItems<E> getItems()
protected DataGridItems<E> getDataGridItemsNN()
@Nullable protected EntityDataGridItems<E> getEntityDataGridItems()
protected EntityDataGridItems<E> getEntityDataGridItemsNN()
public void setItems(@Nullable DataGridItems<E> dataGridItems)
DataGrid
DataGridItems
as the DataGrid data source.protected void setUiTestId(DataGridItems<E> items)
protected com.vaadin.data.provider.DataProvider<E,?> createEmptyDataProvider()
protected void setVisibleColumns(java.util.List<DataGrid.Column<E>> visibleColumnsOrder)
protected java.util.Collection<io.jmix.core.metamodel.model.MetaPropertyPath> getAutowiredProperties(EntityDataGridItems<E> entityDataGridSource)
protected void setupAutowiredColumns(EntityDataGridItems<E> entityDataGridSource)
protected DataGridDataProvider<E> createDataGridDataProvider(DataGridItems<E> dataGridItems)
public void dataGridSourceItemSetChanged(DataGridItems.ItemSetChangeEvent<E> event)
dataGridSourceItemSetChanged
in interface DataGridItemsEventsDelegate<E>
public void dataGridSourcePropertyValueChanged(DataGridItems.ValueChangeEvent<E> event)
dataGridSourcePropertyValueChanged
in interface DataGridItemsEventsDelegate<E>
public void dataGridSourceStateChanged(DataUnit.StateChangeEvent event)
dataGridSourceStateChanged
in interface DataGridItemsEventsDelegate<E>
public void dataGridSourceSelectedItemChanged(DataGridItems.SelectedItemChangeEvent<E> event)
dataGridSourceSelectedItemChanged
in interface DataGridItemsEventsDelegate<E>
protected java.lang.String[] getColumnOrder()
@Nullable public java.lang.String getCaption()
getCaption
in interface Component.HasCaption
getCaption
in class AbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
public void setCaption(@Nullable java.lang.String caption)
Component.HasCaption
setCaption
in interface Component.HasCaption
setCaption
in class AbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
caption
- the new component's captionpublic boolean isCaptionAsHtml()
isCaptionAsHtml
in interface HasHtmlCaption
isCaptionAsHtml
in class AbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
true
if the caption is rendered as HTML,
false
if rendered as plain textpublic void setCaptionAsHtml(boolean captionAsHtml)
HasHtmlCaption
setCaptionAsHtml
in interface HasHtmlCaption
setCaptionAsHtml
in class AbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
captionAsHtml
- true
if the caption is rendered as HTML,
false
if rendered as plain textComponent.HasCaption.setCaption(String)
public boolean isTextSelectionEnabled()
isTextSelectionEnabled
in interface DataGrid<E>
true
if text selection is enabled.public void setTextSelectionEnabled(boolean textSelectionEnabled)
DataGrid
false
.setTextSelectionEnabled
in interface DataGrid<E>
textSelectionEnabled
- specifies whether text selection in DataGrid cells is enabledpublic boolean isColumnReorderingAllowed()
DataGrid
true
.isColumnReorderingAllowed
in interface DataGrid<E>
true
if reordering is allowedpublic void setColumnReorderingAllowed(boolean columnReorderingAllowed)
DataGrid
true
.setColumnReorderingAllowed
in interface DataGrid<E>
columnReorderingAllowed
- specifies whether column reordering is allowedpublic boolean isSortable()
isSortable
in interface DataGrid<E>
true
if individual column sortable
attribute can be set to true
, false
otherwisepublic void setSortable(boolean sortable)
DataGrid
true
.setSortable
in interface DataGrid<E>
sortable
- true
if individual column sortable
attribute can be set to true
, false
otherwisepublic boolean isColumnsCollapsingAllowed()
isColumnsCollapsingAllowed
in interface DataGrid<E>
true
if individual column collapsible attribute
can be set to true
, false
otherwisepublic void setColumnsCollapsingAllowed(boolean columnsCollapsingAllowed)
DataGrid
true
.setColumnsCollapsingAllowed
in interface DataGrid<E>
columnsCollapsingAllowed
- true
if individual column collapsible attribute
can be set to true
, false
otherwisepublic boolean isEditorEnabled()
DataGrid
isEditorEnabled
in interface DataGrid<E>
true
if the editor is enabled for this gridDataGrid.setEditorEnabled(boolean)
,
DataGrid.getEditedItem()
public void setEditorEnabled(boolean isEnabled)
DataGrid
DataGrid.edit(Object)
method.setEditorEnabled
in interface DataGrid<E>
isEnabled
- true
to enable the feature, false
otherwiseDataGrid.getEditedItem()
public boolean isEditorBuffered()
DataGrid
isEditorBuffered
in interface DataGrid<E>
true
if buffered editor is enabled, false
otherwisepublic void setEditorBuffered(boolean editorBuffered)
DataGrid
true
).setEditorBuffered
in interface DataGrid<E>
editorBuffered
- true
to enable buffered editor, false
to disable itpublic java.lang.String getEditorSaveCaption()
DataGrid
getEditorSaveCaption
in interface DataGrid<E>
public void setEditorSaveCaption(java.lang.String saveCaption)
DataGrid
setEditorSaveCaption
in interface DataGrid<E>
saveCaption
- the caption to setpublic java.lang.String getEditorCancelCaption()
DataGrid
getEditorCancelCaption
in interface DataGrid<E>
public void setEditorCancelCaption(java.lang.String cancelCaption)
DataGrid
setEditorCancelCaption
in interface DataGrid<E>
cancelCaption
- the caption to setpublic E getEditedItem()
DataGrid
getEditedItem
in interface DataGrid<E>
null
if no item is being edited at the momentpublic boolean isEditorActive()
DataGrid
isEditorActive
in interface DataGrid<E>
true
if the editor is openpublic void edit(E item)
DataGrid
edit
in interface DataGrid<E>
item
- the item to editDataGrid.setEditorEnabled(boolean)
protected void editItemInternal(E item)
protected java.util.Map<java.lang.String,Field> convertToJmixFields(java.util.Map<com.vaadin.ui.Grid.Column<E,?>,com.vaadin.ui.Component> columnFieldMap)
public io.jmix.core.common.event.Subscription addEditorOpenListener(java.util.function.Consumer<DataGrid.EditorOpenEvent<E>> listener)
DataGrid
addEditorOpenListener
in interface DataGrid<E>
listener
- the listener to registerprotected void onEditorOpen(com.vaadin.ui.components.grid.EditorOpenEvent<E> editorOpenEvent)
protected void internalRemoveEditorOpenListener(java.util.function.Consumer<DataGrid.EditorOpenEvent<E>> listener)
public io.jmix.core.common.event.Subscription addEditorCloseListener(java.util.function.Consumer<DataGrid.EditorCloseEvent<E>> listener)
DataGrid
addEditorCloseListener
in interface DataGrid<E>
listener
- the listener to registerprotected void onEditorCancel(com.vaadin.ui.components.grid.EditorCancelEvent<E> cancelEvent)
protected void internalRemoveEditorCloseListener(java.util.function.Consumer<DataGrid.EditorCloseEvent<E>> listener)
public io.jmix.core.common.event.Subscription addEditorPreCommitListener(java.util.function.Consumer<DataGrid.EditorPreCommitEvent<E>> listener)
DataGrid
addEditorPreCommitListener
in interface DataGrid<E>
listener
- the listener to registerprotected void onEditorBeforeSave(JmixEditorBeforeSaveEvent<E> event)
protected void internalRemoveEditorPreCommitListener(java.util.function.Consumer<DataGrid.EditorPreCommitEvent<E>> listener)
public io.jmix.core.common.event.Subscription addEditorPostCommitListener(java.util.function.Consumer<DataGrid.EditorPostCommitEvent<E>> listener)
DataGrid
addEditorPostCommitListener
in interface DataGrid<E>
listener
- the listener to registerprotected void onEditorSave(com.vaadin.ui.components.grid.EditorSaveEvent<E> saveEvent)
protected void internalRemoveEditorPostCommitListener(java.util.function.Consumer<DataGrid.EditorPostCommitEvent<E>> listener)
public void setEditorCrossFieldValidate(boolean validate)
DataGrid
setEditorCrossFieldValidate
in interface DataGrid<E>
validate
- validate option, true if an editor should validate cross field rulespublic boolean isEditorCrossFieldValidate()
isEditorCrossFieldValidate
in interface DataGrid<E>
protected InstanceContainer<E> createInstanceContainer(E item)
protected void clearFieldDatasources(@Nullable E item)
protected void detachItemContainer(java.lang.Object container)
protected ValueSourceProvider createValueSourceProvider(E item)
public boolean isHeaderVisible()
DataGrid
isHeaderVisible
in interface DataGrid<E>
true
if visible, false
otherwisepublic void setHeaderVisible(boolean headerVisible)
DataGrid
setHeaderVisible
in interface DataGrid<E>
headerVisible
- true
to show the header section, false
to hidepublic boolean isFooterVisible()
DataGrid
isFooterVisible
in interface DataGrid<E>
true
if visible, false
otherwisepublic void setFooterVisible(boolean footerVisible)
DataGrid
setFooterVisible
in interface DataGrid<E>
footerVisible
- true
to show the footer section, false
to hidepublic double getBodyRowHeight()
DataGrid
getBodyRowHeight
in interface DataGrid<E>
public void setBodyRowHeight(double rowHeight)
DataGrid
setBodyRowHeight
in interface DataGrid<E>
rowHeight
- the height of a row in pixels or -1 for AUTOpublic double getHeaderRowHeight()
DataGrid
getHeaderRowHeight
in interface DataGrid<E>
public void setHeaderRowHeight(double rowHeight)
DataGrid
setHeaderRowHeight
in interface DataGrid<E>
rowHeight
- the height of a row in pixels or -1 for AUTOpublic double getFooterRowHeight()
DataGrid
getFooterRowHeight
in interface DataGrid<E>
public void setFooterRowHeight(double rowHeight)
DataGrid
setFooterRowHeight
in interface DataGrid<E>
rowHeight
- the height of a row in pixels or -1 for AUTOpublic boolean isContextMenuEnabled()
isContextMenuEnabled
in interface DataGrid<E>
true
if context menu is enabled, false
otherwisepublic void setContextMenuEnabled(boolean contextMenuEnabled)
DataGrid
true
.setContextMenuEnabled
in interface DataGrid<E>
contextMenuEnabled
- specifies whether context menu is enabledpublic DataGrid.ColumnResizeMode getColumnResizeMode()
DataGrid
DataGrid.ColumnResizeMode.ANIMATED
.getColumnResizeMode
in interface DataGrid<E>
public void setColumnResizeMode(DataGrid.ColumnResizeMode mode)
DataGrid
DataGrid.ColumnResizeMode.ANIMATED
.setColumnResizeMode
in interface DataGrid<E>
mode
- a ColumnResizeMode valuepublic DataGrid.SelectionMode getSelectionMode()
getSelectionMode
in interface DataGrid<E>
DataGrid.SelectionMode
public void setSelectionMode(DataGrid.SelectionMode selectionMode)
DataGrid
setSelectionMode
in interface DataGrid<E>
selectionMode
- the selection mode to usepublic boolean isMultiSelect()
isMultiSelect
in interface ListComponent<E>
@Nullable public E getSingleSelected()
ListComponent
null
. If multiple selection mode is enabled, returns the first selected instance.getSingleSelected
in interface ListComponent<E>
public java.util.Set<E> getSelected()
ListComponent
Collections.emptySet()
.getSelected
in interface ListComponent<E>
public void setSelected(@Nullable E item)
ListComponent
setSelected
in interface ListComponent<E>
item
- entity instance to select the row, null
to reset the selectionpublic void setSelected(java.util.Collection<E> items)
ListComponent
setSelected
in interface ListComponent<E>
items
- collection of entity instances to select rowsprotected void setSelectedItems(java.util.Collection<E> items)
public void selectAll()
DataGrid
public void deselect(E item)
DataGrid
public void deselectAll()
DataGrid
deselectAll
in interface DataGrid<E>
public void sort(java.lang.String columnId, DataGrid.SortDirection direction)
DataGrid
public java.util.List<DataGrid.SortOrder> getSortOrder()
getSortOrder
in interface DataGrid<E>
protected java.util.List<DataGrid.SortOrder> convertToDataGridSortOrder(java.util.List<com.vaadin.data.provider.GridSortOrder<E>> gridSortOrder)
public void addAction(Action action)
ActionsHolder
addAction
in interface ActionsHolder
public void addAction(Action action, int index)
ActionsHolder
addAction
in interface ActionsHolder
protected AbstractDataGrid.ActionMenuItemWrapper createContextMenuItem(Action action)
protected void attachAction(Action action)
public void removeAction(Action action)
ActionsHolder
removeAction
in interface ActionsHolder
public void removeAction(java.lang.String id)
ActionsHolder
removeAction
in interface ActionsHolder
public void removeAllActions()
ActionsHolder
removeAllActions
in interface ActionsHolder
public java.util.Collection<Action> getActions()
getActions
in interface ActionsHolder
@Nullable public Action getAction(java.lang.String id)
getAction
in interface ActionsHolder
public ActionsPermissions getActionsPermissions()
getActionsPermissions
in interface SecuredActionsHolder
protected java.util.List<DataGrid.Column<E>> getInitialVisibleColumns()
public com.vaadin.ui.Component getComposition()
getComposition
in interface Component.Wrapper
getComposition
in class AbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
public int getFrozenColumnCount()
DataGrid
hidden
columns
in the count.getFrozenColumnCount
in interface DataGrid<E>
DataGrid.setFrozenColumnCount(int)
public void setFrozenColumnCount(int numberOfColumns)
DataGrid
The default value is 0.
setFrozenColumnCount
in interface DataGrid<E>
numberOfColumns
- the number of columns that should be frozenpublic void scrollTo(E item)
DataGrid
DataGrid.ScrollDestination.ANY
.scrollTo
in interface DataGrid<E>
item
- item to scroll toDataGrid.scrollTo(Object, ScrollDestination)
,
DataGrid.scrollToStart()
,
DataGrid.scrollToEnd()
public void scrollTo(E item, DataGrid.ScrollDestination destination)
DataGrid
scrollTo
in interface DataGrid<E>
item
- item to scroll todestination
- value specifying desired position of scrolled-to rowDataGrid.scrollTo(Object)
,
DataGrid.scrollToStart()
,
DataGrid.scrollToEnd()
public void scrollToStart()
DataGrid
scrollToStart
in interface DataGrid<E>
DataGrid.scrollTo(Object)
,
DataGrid.scrollTo(Object, ScrollDestination)
,
DataGrid.scrollToEnd()
public void scrollToEnd()
DataGrid
scrollToEnd
in interface DataGrid<E>
DataGrid.scrollTo(Object)
,
DataGrid.scrollTo(Object, ScrollDestination)
,
DataGrid.scrollToStart()
public void repaint()
DataGrid
protected boolean canBeSorted(@Nullable DataGridItems<E> dataGridItems)
public void setDebugId(@Nullable java.lang.String id)
HasDebugId
setDebugId
in interface HasDebugId
setDebugId
in class AbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
public void setId(@Nullable java.lang.String id)
Component
setId
in interface Component
setId
in class AbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
public void setStyleName(@Nullable java.lang.String name)
Component
setStyleName
in interface Component
setStyleName
in class AbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
name
- one or more style names separated by space.@Nullable public ButtonsPanel getButtonsPanel()
getButtonsPanel
in interface HasButtonsPanel
public void setButtonsPanel(@Nullable ButtonsPanel panel)
HasButtonsPanel
ButtonsPanel
component.setButtonsPanel
in interface HasButtonsPanel
panel
- a buttons panel component@Nullable public PaginationComponent getPagination()
getPagination
in interface HasPagination
public void setPagination(@Nullable PaginationComponent pagination)
HasPagination
setPagination
in interface HasPagination
protected void onPaginationAfterRefresh(PaginationComponent.AfterRefreshEvent event)
public void setupPaginationDataSourceProvider()
protected com.vaadin.ui.CssLayout createTopPanel()
protected void updateCompositionStylesTopPanelVisible()
@Nullable public Action getEnterPressAction()
getEnterPressAction
in interface DataGrid<E>
DataGrid.setEnterPressAction(Action)
DataGrid.setEnterPressAction(Action)
public void setEnterPressAction(@Nullable Action action)
DataGrid
If such action is not set, the table responds to pressing Enter by trying to find and execute the following actions:
DataGrid.setItemClickAction(Action)
shortcut
propertyIf one of these actions is found and it is enabled, it is executed.
setEnterPressAction
in interface DataGrid<E>
action
- an action to be executed on Enter key pressDataGrid.setItemClickAction(Action)
@Nullable public Action getItemClickAction()
getItemClickAction
in interface DataGrid<E>
DataGrid.setItemClickAction(Action)
DataGrid.setItemClickAction(Action)
public void setItemClickAction(@Nullable Action action)
DataGrid
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.
setItemClickAction
in interface DataGrid<E>
action
- an action to be executed on double click on a DataGrid row@Nullable protected AbstractDataGrid.ColumnImpl<E> getColumnByGridColumn(com.vaadin.ui.Grid.Column<E,?> gridColumn)
@Nullable protected DataGrid.Column<E> getColumnById(java.lang.Object id)
public void addRowStyleProvider(java.util.function.Function<? super E,java.lang.String> styleProvider)
DataGrid
DataGrid can use several providers to obtain many style names for rows.
addRowStyleProvider
in interface DataGrid<E>
styleProvider
- a style provider to add, not nullpublic void removeRowStyleProvider(java.util.function.Function<? super E,java.lang.String> styleProvider)
DataGrid
removeRowStyleProvider
in interface DataGrid<E>
styleProvider
- a style provider to remove, not null@Nullable public java.util.function.Function<E,java.lang.String> getRowDescriptionProvider()
DataGrid
RowDescriptionProvider
instance used to generate
descriptions (tooltips) for DataGrid rowsgetRowDescriptionProvider
in interface DataGrid<E>
public void setRowDescriptionProvider(@Nullable java.util.function.Function<? super E,java.lang.String> provider)
DataGrid
RowDescriptionProvider
instance for generating
optional descriptions (tooltips) for DataGrid rows. If a
DataGrid.Column.setDescriptionProvider(Function)
is also set,
the row description generated by provider
is used for cells
for which the cell description provider returns null.
This method uses the ContentMode.PREFORMATTED
content mode.
setRowDescriptionProvider
in interface DataGrid<E>
provider
- the description provider to use or null
to remove a
previously set provider if anypublic void setRowDescriptionProvider(@Nullable java.util.function.Function<? super E,java.lang.String> provider, ContentMode contentMode)
DataGrid
RowDescriptionProvider
instance for generating
optional descriptions (tooltips) for DataGrid rows. If a
DataGrid.Column.setDescriptionProvider(Function)
is also set,
the row description generated by provider
is used for cells
for which the cell description provider returns null.setRowDescriptionProvider
in interface DataGrid<E>
provider
- the description provider to use or null
to remove a
previously set provider if anycontentMode
- the content mode for row tooltips@Nullable protected java.lang.String getRowDescription(E item)
public DataGrid.Column<E> addGeneratedColumn(java.lang.String columnId, java.util.function.Function<DataGrid.ColumnGeneratorEvent<E>,?> generator)
DataGrid
addGeneratedColumn
in interface DataGrid<E>
columnId
- column identifier as defined in XML descriptorgenerator
- column generator instanceDataGrid.addGeneratedColumn(String, Function, int)
public DataGrid.Column<E> addGeneratedColumn(java.lang.String columnId, java.util.function.Function<DataGrid.ColumnGeneratorEvent<E>,?> generator, int index)
DataGrid
addGeneratedColumn
in interface DataGrid<E>
columnId
- column identifier as defined in XML descriptorgenerator
- column generator instanceindex
- index of a new generated columnDataGrid.addGeneratedColumn(String, Function)
protected com.vaadin.data.ValueProvider<E,java.lang.Object> createGeneratedColumnValueProvider(java.lang.String columnId, java.util.function.Function<DataGrid.ColumnGeneratorEvent<E>,?> generator)
@Nullable public java.util.function.Function<DataGrid.ColumnGeneratorEvent<E>,?> getColumnGenerator(java.lang.String columnId)
DataGrid
getColumnGenerator
in interface DataGrid<E>
columnId
- the column id for which to return column generatorprotected void copyColumnProperties(DataGrid.Column<E> column, DataGrid.Column<E> existingColumn)
public io.jmix.core.common.event.Subscription addColumnCollapsingChangeListener(java.util.function.Consumer<DataGrid.ColumnCollapsingChangeEvent> listener)
DataGrid
addColumnCollapsingChangeListener
in interface DataGrid<E>
listener
- the listener to registerprotected void onColumnVisibilityChanged(com.vaadin.ui.Grid.ColumnVisibilityChangeEvent e)
protected void internalRemoveColumnCollapsingChangeListener(java.util.function.Consumer<DataGrid.ColumnCollapsingChangeEvent> listener)
public io.jmix.core.common.event.Subscription addColumnResizeListener(java.util.function.Consumer<DataGrid.ColumnResizeEvent> listener)
DataGrid
addColumnResizeListener
in interface DataGrid<E>
listener
- the listener to registerprotected void onColumnResize(com.vaadin.ui.Grid.ColumnResizeEvent e)
protected void internalRemoveColumnResizeListener(java.util.function.Consumer<DataGrid.ColumnResizeEvent> listener)
public io.jmix.core.common.event.Subscription addSortListener(java.util.function.Consumer<DataGrid.SortEvent> listener)
DataGrid
addSortListener
in interface DataGrid<E>
listener
- the listener to registerpublic io.jmix.core.common.event.Subscription addColumnReorderListener(java.util.function.Consumer<DataGrid.ColumnReorderEvent> listener)
DataGrid
addColumnReorderListener
in interface DataGrid<E>
listener
- the listener to registerpublic io.jmix.core.common.event.Subscription addSelectionListener(java.util.function.Consumer<DataGrid.SelectionEvent<E>> listener)
DataGrid
addSelectionListener
in interface DataGrid<E>
listener
- the listener to registerpublic io.jmix.core.common.event.Subscription addItemClickListener(java.util.function.Consumer<DataGrid.ItemClickEvent<E>> listener)
DataGrid
addItemClickListener
in interface DataGrid<E>
listener
- the listener to registerpublic io.jmix.core.common.event.Subscription addContextClickListener(java.util.function.Consumer<DataGrid.ContextClickEvent> listener)
DataGrid
addContextClickListener
in interface DataGrid<E>
listener
- the listener to registerprotected void onContextClick(com.vaadin.event.ContextClickEvent e)
protected void internalRemoveContextClickListener(java.util.function.Consumer<DataGrid.ContextClickEvent> listener)
public io.jmix.core.common.event.Subscription addLookupValueChangeListener(java.util.function.Consumer<LookupComponent.LookupSelectionChangeEvent<E>> listener)
LookupComponent.LookupSelectionChangeNotifier
addLookupValueChangeListener
in interface LookupComponent.LookupSelectionChangeNotifier<E>
listener
- a listener to addSubscription
@Nullable public DataGrid.HeaderRow getHeaderRow(int index)
DataGrid
getHeaderRow
in interface DataGrid<E>
index
- 0 based index for row. Counted from top to bottom@Nullable protected DataGrid.HeaderRow getHeaderRowByGridRow(com.vaadin.ui.components.grid.HeaderRow gridRow)
public DataGrid.HeaderRow appendHeaderRow()
DataGrid
appendHeaderRow
in interface DataGrid<E>
DataGrid.prependHeaderRow()
,
DataGrid.addHeaderRowAt(int)
,
DataGrid.removeHeaderRow(HeaderRow)
,
DataGrid.removeHeaderRow(int)
public DataGrid.HeaderRow prependHeaderRow()
DataGrid
prependHeaderRow
in interface DataGrid<E>
DataGrid.appendHeaderRow()
,
DataGrid.addHeaderRowAt(int)
,
DataGrid.removeHeaderRow(HeaderRow)
,
DataGrid.removeHeaderRow(int)
public DataGrid.HeaderRow addHeaderRowAt(int index)
DataGrid
addHeaderRowAt
in interface DataGrid<E>
index
- the position at which to insert the rowDataGrid.appendHeaderRow()
,
DataGrid.prependHeaderRow()
,
DataGrid.removeHeaderRow(HeaderRow)
,
DataGrid.removeHeaderRow(int)
protected void checkHeaderIndexInRange(int index, boolean includeBounds)
protected DataGrid.HeaderRow addHeaderRowInternal(com.vaadin.ui.components.grid.HeaderRow headerRow)
public void removeHeaderRow(@Nullable DataGrid.HeaderRow headerRow)
DataGrid
removeHeaderRow
in interface DataGrid<E>
headerRow
- the row to be removedDataGrid.removeHeaderRow(int)
,
DataGrid.addHeaderRowAt(int)
,
DataGrid.appendHeaderRow()
,
DataGrid.prependHeaderRow()
public void removeHeaderRow(int index)
DataGrid
removeHeaderRow
in interface DataGrid<E>
index
- the position of the rowDataGrid.removeHeaderRow(HeaderRow)
,
DataGrid.addHeaderRowAt(int)
,
DataGrid.appendHeaderRow()
,
DataGrid.prependHeaderRow()
@Nullable public DataGrid.HeaderRow getDefaultHeaderRow()
DataGrid
getDefaultHeaderRow
in interface DataGrid<E>
public void setDefaultHeaderRow(DataGrid.HeaderRow headerRow)
DataGrid
setDefaultHeaderRow
in interface DataGrid<E>
headerRow
- the new default row, or null for no default rowpublic int getHeaderRowCount()
DataGrid
getHeaderRowCount
in interface DataGrid<E>
@Nullable public DataGrid.FooterRow getFooterRow(int index)
DataGrid
getFooterRow
in interface DataGrid<E>
index
- 0 based index for row. Counted from top to bottom@Nullable protected DataGrid.FooterRow getFooterRowByGridRow(com.vaadin.ui.components.grid.FooterRow gridRow)
public DataGrid.FooterRow appendFooterRow()
DataGrid
appendFooterRow
in interface DataGrid<E>
DataGrid.prependFooterRow()
,
DataGrid.addFooterRowAt(int)
,
DataGrid.removeFooterRow(FooterRow)
,
DataGrid.removeFooterRow(int)
public DataGrid.FooterRow prependFooterRow()
DataGrid
prependFooterRow
in interface DataGrid<E>
DataGrid.appendFooterRow()
,
DataGrid.addFooterRowAt(int)
,
DataGrid.removeFooterRow(FooterRow)
,
DataGrid.removeFooterRow(int)
public DataGrid.FooterRow addFooterRowAt(int index)
DataGrid
addFooterRowAt
in interface DataGrid<E>
index
- the position at which to insert the rowDataGrid.appendFooterRow()
,
DataGrid.prependFooterRow()
,
DataGrid.removeFooterRow(FooterRow)
,
DataGrid.removeFooterRow(int)
protected int calculateFooterIndex(int index)
protected DataGrid.FooterRow addFooterRowInternal(com.vaadin.ui.components.grid.FooterRow footerRow)
public void removeFooterRow(@Nullable DataGrid.FooterRow footerRow)
DataGrid
removeFooterRow
in interface DataGrid<E>
footerRow
- the row to be removedDataGrid.removeFooterRow(int)
,
DataGrid.addFooterRowAt(int)
,
DataGrid.appendFooterRow()
,
DataGrid.prependFooterRow()
public void removeFooterRow(int index)
DataGrid
removeFooterRow
in interface DataGrid<E>
index
- the position of the rowDataGrid.removeFooterRow(FooterRow)
,
DataGrid.addFooterRowAt(int)
,
DataGrid.appendFooterRow()
,
DataGrid.prependFooterRow()
public int getFooterRowCount()
DataGrid
getFooterRowCount
in interface DataGrid<E>
@Nullable public java.util.function.Function<E,Component> getDetailsGenerator()
getDetailsGenerator
in interface DataGrid<E>
null
if not setpublic void setDetailsGenerator(@Nullable java.util.function.Function<E,Component> detailsGenerator)
DataGrid
The currently opened row details will be re-rendered.
setDetailsGenerator
in interface DataGrid<E>
detailsGenerator
- the details generator to set@Nullable protected com.vaadin.ui.Component getRowDetails(E item)
public boolean isDetailsVisible(E entity)
DataGrid
isDetailsVisible
in interface DataGrid<E>
entity
- the item for which to check details visibilitytrue
if the details are visiblepublic void setDetailsVisible(E entity, boolean visible)
DataGrid
setDetailsVisible
in interface DataGrid<E>
entity
- the item for which to set details visibilityvisible
- true
to show the details, or false
to hide thempublic int getTabIndex()
Component.Focusable
HasTabIndex
component.getTabIndex
in interface Component.Focusable
HasTabIndex
componentpublic void setTabIndex(int tabIndex)
Component.Focusable
Focusable
component.
The tab index property is used to specify the order in which the
fields are focused when the user presses the Tab key. Components with
a defined tab index are focused sequentially first, and then the
components with no tab index.setTabIndex
in interface Component.Focusable
tabIndex
- tab indexpublic boolean isAggregatable()
isAggregatable
in interface DataGrid<E>
public void setAggregatable(boolean aggregatable)
DataGrid
setAggregatable
in interface DataGrid<E>
aggregatable
- aggregatable optionpublic DataGrid.AggregationPosition getAggregationPosition()
getAggregationPosition
in interface DataGrid<E>
public void setAggregationPosition(DataGrid.AggregationPosition position)
DataGrid
DataGrid.AggregationPosition.TOP
.setAggregationPosition
in interface DataGrid<E>
position
- position: DataGrid.AggregationPosition.TOP
or DataGrid.AggregationPosition.BOTTOM
public java.util.Map<java.lang.String,java.lang.Object> getAggregationResults()
getAggregationResults
in interface DataGrid<E>
public void setEmptyStateMessage(@Nullable java.lang.String message)
DataGrid
setEmptyStateMessage
in interface DataGrid<E>
message
- message that appears when DataGrid is empty@Nullable public java.lang.String getEmptyStateMessage()
getEmptyStateMessage
in interface DataGrid<E>
public void setEmptyStateLinkMessage(@Nullable java.lang.String linkMessage)
DataGrid
setEmptyStateLinkMessage
in interface DataGrid<E>
linkMessage
- message that appears when DataGrid is emptyDataGrid.setEmptyStateLinkClickHandler(Consumer)
@Nullable public java.lang.String getEmptyStateLinkMessage()
getEmptyStateLinkMessage
in interface DataGrid<E>
public void setEmptyStateLinkClickHandler(@Nullable java.util.function.Consumer<DataGrid.EmptyStateClickEvent<E>> handler)
DataGrid
setEmptyStateLinkClickHandler
in interface DataGrid<E>
handler
- handler to setDataGrid.setEmptyStateLinkMessage(String)
@Nullable public java.util.function.Consumer<DataGrid.EmptyStateClickEvent<E>> getEmptyStateLinkClickHandler()
getEmptyStateLinkClickHandler
in interface DataGrid<E>
protected AggregatableDelegate<java.lang.Object> getAggregatableDelegate()
protected java.util.Map<java.lang.String,java.lang.String> __aggregate()
protected java.util.Map<java.lang.String,java.lang.Object> __aggregateValues()
protected <V> java.util.Map<java.lang.String,V> convertAggregationKeyMapToColumnIdKeyMap(java.util.Map<AggregationInfo,V> aggregationInfoMap)
protected java.util.List<AggregationInfo> getAggregationInfos()
protected void checkAggregation(AggregationInfo aggregationInfo)
protected void fillAggregationRow(java.util.Map<java.lang.String,java.lang.String> values)
protected void initAggregationRow()
protected void updateAggregationRow()
protected void removeAggregationRow()
protected java.lang.String getColumnAggregationDescription(DataGrid.Column<E> column)
protected java.lang.String getColumnAggregationDescriptionByType(DataGrid.Column<E> column)
protected void enableCrossFieldValidationHandling(boolean enable)
@Nullable protected java.lang.String validateCrossFieldRules(java.util.Map<java.lang.String,java.lang.Object> properties)
@Nullable protected java.lang.String getGeneratedRowStyle(E item)
protected void initEmptyState()
protected void showEmptyStateIfPossible()
@Nullable protected java.lang.String getGeneratedCellStyle(E item, DataGrid.Column<E> column)
@Nullable protected java.lang.String getGeneratedCellDescription(E item, DataGrid.Column<E> column)