Package io.jmix.ui.component.impl
Class AbstractDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>,E>
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<C>
io.jmix.ui.component.impl.AbstractDataGrid<C,E>
- All Implemented Interfaces:
ActionsHolder
,AttachNotifier
,Component
,Component.BelongToFrame
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,DataGrid<E>
,DataGridItemsEventsDelegate<E>
,HasButtonsPanel
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasInnerComponents
,HasMinSize
,HasPagination
,HasSubParts
,ListComponent<E>
,LookupComponent<E>
,LookupComponent.LookupSelectionChangeNotifier<E>
,SecuredActionsHolder
,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
DataGridImpl
,TreeDataGridImpl
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
protected static class
protected static class
static class
protected class
protected class
AbstractDataGrid.CellStyleGeneratorAdapter<T extends E>
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.DataGrid
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
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.LookupComponent
LookupComponent.LookupSelectionChangeEvent<T>, LookupComponent.LookupSelectionChangeNotifier<T>
-
Field Summary
Modifier and TypeFieldDescriptionprotected AccessManager
protected Actions
protected final ActionsPermissions
protected AggregatableDelegate<Object>
protected Aggregations
protected ButtonsPanel
protected com.vaadin.shared.Registration
protected final Map<String,
Function<DataGrid.ColumnGeneratorEvent<E>, ?>> protected com.vaadin.shared.Registration
protected final Map<String,
DataGrid.Column<E>> protected boolean
protected List<DataGrid.Column<E>>
protected AbstractDataGrid.GridComposition
protected com.vaadin.shared.Registration
protected JmixGridContextMenu<E>
protected final List<AbstractDataGrid.ActionMenuItemWrapper>
protected DataGridDataProvider<E>
protected com.vaadin.shared.Registration
protected com.vaadin.shared.Registration
protected boolean
protected com.vaadin.shared.Registration
protected com.vaadin.shared.Registration
protected Consumer<DataGrid.EmptyStateClickEvent<E>>
protected Action
protected com.vaadin.ui.components.grid.FooterRow
protected final List<DataGrid.FooterRow>
protected static final String
protected com.vaadin.ui.components.grid.HeaderRow
protected final List<DataGrid.HeaderRow>
protected IconResolver
protected Action
protected Messages
protected MessageTools
protected MetadataTools
protected PaginationComponent
protected ScreenValidation
protected DataGrid.SelectionMode
protected final ShortcutsDelegate<com.vaadin.event.ShortcutListener>
protected boolean
protected boolean
protected static final String
protected boolean
protected com.vaadin.ui.CssLayout
protected UiTestIdsSupport
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an action to the componentvoid
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.addColumn
(String id, MetaPropertyPath propertyPath) Creates new column with given Id and property, then adds this column to DataGrid.addColumn
(String id, MetaPropertyPath propertyPath, int index) Creates new column with given Id and property at the specified index, then adds this column to DataGrid.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) Registers a new column reorder listener.Registers a new column resize listener.Registers a new context click listeneraddEditorCloseListener
(Consumer<DataGrid.EditorCloseEvent<E>> listener) Registers a new DataGrid editor close listener.addEditorOpenListener
(Consumer<DataGrid.EditorOpenEvent<E>> listener) Registers a new DataGrid editor open listener.Registers a new DataGrid editor post commit listener.Registers a new DataGrid editor pre commit listener.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) addGeneratedColumn
(String columnId, Function<DataGrid.ColumnGeneratorEvent<E>, ?> generator) Add a generated column to the DataGrid.addGeneratedColumn
(String columnId, Function<DataGrid.ColumnGeneratorEvent<E>, ?> generator, int index) Add a generated column to the DataGrid.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) addItemClickListener
(Consumer<DataGrid.ItemClickEvent<E>> listener) Registers a new item click listenerAdds a listener that invoked when lookup selected items set is changed.void
addRowStyleProvider
(Function<? super E, String> styleProvider) Adds style provider for the DataGrid rows.addSelectionListener
(Consumer<DataGrid.SelectionEvent<E>> listener) Registers a new selection listeneraddSortListener
(Consumer<DataGrid.SortEvent> listener) Registers a new sort order change listenervoid
Adds a new row at the bottom of the footer section.Adds a new row at the bottom of the header section.protected void
attachAction
(Action action) void
attached()
Notifies all listeners that component has been attached.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) void
Closes editor if it's opened.convertAggregationKeyMapToColumnIdKeyMap
(Map<AggregationInfo, V> aggregationInfoMap) protected List<DataGrid.SortOrder>
convertToDataGridSortOrder
(List<com.vaadin.data.provider.GridSortOrder<E>> gridSortOrder) convertToJmixFields
(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
(String id, MetaPropertyPath propertyPath, AbstractDataGrid<?, E> owner) protected abstract C
protected AbstractDataGrid.GridComposition
protected AbstractDataGrid.ActionMenuItemWrapper
createContextMenuItem
(Action action) protected DataGridDataProvider<E>
createDataGridDataProvider
(DataGridItems<E> dataGridItems) protected JmixGridEditorFieldFactory<E>
protected com.vaadin.data.provider.DataProvider<E,
?> protected ShortcutListenerDelegate
createGeneratedColumnValueProvider
(String columnId, Function<DataGrid.ColumnGeneratorEvent<E>, ?> generator) protected InstanceContainer<E>
createInstanceContainer
(E item) protected ShortcutsDelegate<com.vaadin.event.ShortcutListener>
protected com.vaadin.ui.CssLayout
protected ValueSourceProvider
createValueSourceProvider
(E item) void
void
void
void
void
Deselects the given item.void
Deselects all the items in the current data source.void
detached()
Notifies all listeners that component has been detached.protected void
detachItemContainer
(Object container) void
Opens the editor interface for the provided entity.protected void
editItemInternal
(E item) protected void
enableCrossFieldValidationHandling
(boolean enable) protected void
fillAggregationRow
(Map<String, String> values) protected void
fireSelectionEvent
(com.vaadin.event.selection.SelectionEvent<E> e) void
focus()
Sets focus to this componentprotected String
generateColumnCaption
(DataGrid.Column<E> column) protected AggregatableDelegate<Object>
protected List<AggregationInfo>
protected Collection<MetaPropertyPath>
getAutowiredProperties
(EntityDataGridItems<E> entityDataGridSource) double
Returns the current body row height.Returns a column based on the Id.protected String
protected String
protected AbstractDataGrid.ColumnImpl<E>
getColumnByGridColumn
(com.vaadin.ui.Grid.Column<E, ?> gridColumn) protected DataGrid.Column<E>
getColumnById
(Object id) getColumnGenerator
(String columnId) Gets the columns generator for the given column id.getColumnNN
(String id) Returns a column by its Id.protected String[]
protected com.vaadin.data.ValueProvider
protected com.vaadin.ui.renderers.Renderer
Returns the current column resize mode.Returns a copy of currently configured columns in their current visual order in this DataGrid.protected List<DataGrid.Column<E>>
com.vaadin.ui.Component
protected DataGridItems<E>
Returns the current default row of the header section.protected com.vaadin.data.ValueProvider
protected com.vaadin.ui.renderers.Renderer
getDefaultRenderer
(DataGrid.Column<E> column) Returns the item that is currently being edited.Gets the current caption of the cancel button in the DataGrid editor.Gets the current caption of the save button in the DataGrid editor.protected Action
protected EntityDataGridItems<E>
protected EntityDataGridItems<E>
getFooterRow
(int index) Gets the footer row at given index.protected DataGrid.FooterRow
getFooterRowByGridRow
(com.vaadin.ui.components.grid.FooterRow gridRow) int
Gets the row count for the footer.double
Returns the current footer row height.int
Gets the number of frozen columns in this DataGrid.protected String
getGeneratedCellDescription
(E item, DataGrid.Column<E> column) protected String
getGeneratedCellStyle
(E item, DataGrid.Column<E> column) protected String
getGeneratedRowStyle
(E item) getHeaderRow
(int index) Gets the header row at given index.protected DataGrid.HeaderRow
getHeaderRowByGridRow
(com.vaadin.ui.components.grid.HeaderRow gridRow) int
Gets the row count for the header section.double
Returns the current header row height.protected List<DataGrid.Column<E>>
getItems()
protected String
getRowDescription
(E item) Returns theRowDescriptionProvider
instance used to generate descriptions (tooltips) for DataGrid rowsprotected com.vaadin.ui.Component
getRowDetails
(E item) Returns a set of entity instances corresponding to the selected rows of the list component.Returns an instance of entity corresponding to the selected row of the list component.int
Gets the tabulator index of theHasTabIndex
component.Returns a copy of columns not hidden by security permissions.protected void
protected void
protected void
initComponent
(com.vaadin.ui.Grid<E> component) protected void
initComponentComposition
(AbstractDataGrid.GridComposition componentComposition) protected void
protected void
initEditor
(com.vaadin.ui.Grid<E> component) protected void
protected void
initFooterRows
(com.vaadin.ui.Grid<E> component) protected void
initHeaderRows
(com.vaadin.ui.Grid<E> component) protected void
protected void
internalRemoveColumnCollapsingChangeListener
(Consumer<DataGrid.ColumnCollapsingChangeEvent> listener) protected void
protected void
protected void
protected void
protected void
protected void
boolean
boolean
boolean
Returns whether column reordering is allowed.boolean
boolean
boolean
isDetailsVisible
(E entity) Checks whether details are visible for the given item.boolean
Returns whether an item is currently being edited in the editor.boolean
Gets the buffered editor mode.boolean
boolean
Checks whether the item editor UI is enabled for this DataGrid.boolean
Returns the visibility of the footer section.boolean
Returns the visibility of the header section.boolean
boolean
boolean
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
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
protected void
onSelectionChange
(com.vaadin.event.selection.SelectionEvent<E> e) protected void
Adds a new row at the top of the footer section.Adds a new row at the top of the header section.protected void
void
removeAction
(Action action) Remove the action from the componentvoid
removeAction
(String id) Remove the action by its ID.protected void
void
Remove all actions from the componentvoid
removeColumn
(DataGrid.Column<E> column) Removes the given column from DataGrid or do nothing if column isnull
.void
removeColumn
(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
(int index) Removes the row at the given position from the footer section.void
removeFooterRow
(DataGrid.FooterRow footerRow) Removes the given row from the footer section.void
removeHeaderRow
(int index) Removes the row at the given position from the header section.void
removeHeaderRow
(DataGrid.HeaderRow headerRow) Removes the given row from the header section.void
removeRowStyleProvider
(Function<? super E, String> styleProvider) Removes style provider for the DataGrid rows.void
repaint()
Repaint UI representation of the DataGrid without refreshing the table data.protected List<DataGrid.Column<E>>
restoreColumnsOrder
(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
(List<DataGrid.Column<E>> visibleColumns) void
Scrolls to a certain item, usingDataGrid.ScrollDestination.ANY
.void
scrollTo
(E item, DataGrid.ScrollDestination destination) Scrolls to a certain item, using user-specified scroll destination.void
Scrolls to the last data item.void
Scrolls to the first data item.void
Marks all the items in the current data source as selected.void
setAccessManager
(AccessManager accessManager) void
setActions
(Actions actions) void
setAggregatable
(boolean aggregatable) Set to true if aggregation should be enabled.void
Sets aggregation row position.void
setAggregations
(Aggregations aggregations) void
setBodyRowHeight
(double rowHeight) Sets the height of a body row.void
setButtonsPanel
(ButtonsPanel panel) Sets aButtonsPanel
component.void
setCaption
(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
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
(String id) INTERNAL.void
setDefaultHeaderRow
(DataGrid.HeaderRow headerRow) Sets the default row of the header.void
setDetailsGenerator
(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
(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
(String saveCaption) Sets the caption on the save button in the DataGrid editor.void
Sets click handler for link message.void
setEmptyStateLinkMessage
(String linkMessage) Sets a link message to the middle of DataGrid body that should be appeared when DataGrid is empty.void
setEmptyStateMessage
(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
Set component IDvoid
setItemClickAction
(Action action) Assigns an action to be executed on double click on a DataGrid row.void
setItems
(DataGridItems<E> dataGridItems) Sets an instance ofDataGridItems
as the DataGrid data source.void
setLookupSelectHandler
(Consumer<Collection<E>> selectHandler) void
setMessages
(Messages messages) void
setMessageTools
(MessageTools messageTools) void
setMetadataTools
(MetadataTools metadataTools) void
setMinHeight
(String minHeight) SetsminHeight
CSS property value to the Grid (not a composition).void
setMinWidth
(String minWidth) SetsminWidth
CSS property value to the Grid (not a composition).void
setPagination
(PaginationComponent pagination) Sets pagination component.void
setRowDescriptionProvider
(Function<? super E, String> provider) Sets theRowDescriptionProvider
instance for generating optional descriptions (tooltips) for DataGrid rows.void
setRowDescriptionProvider
(Function<? super E, String> provider, ContentMode contentMode) Sets theRowDescriptionProvider
instance for generating optional descriptions (tooltips) for DataGrid rows.protected void
setScreenValidation
(ScreenValidation screenValidation) void
setSelected
(E item) Selects a row of the list component for a given entity instance.void
setSelected
(Collection<E> items) Selects the rows of the list component for a given collection of entity instances.protected void
setSelectedItems
(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
(String name) Sets one or more style names of the component, replacing any previous styles.void
setTabIndex
(int tabIndex) Sets the tabulator index of theFocusable
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
protected void
setVisibleColumns
(List<DataGrid.Column<E>> visibleColumnsOrder) protected void
void
sort
(String columnId, DataGrid.SortDirection direction) Sorts the DataGrid data for passed column id in the chosen sort direction.protected void
protected void
protected String
validateCrossFieldRules
(Map<String, Object> properties) Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.ActionsHolder
getActionNN
Methods inherited from interface io.jmix.ui.component.Component
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
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Focusable
isFocusable, setFocusable
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.DataGrid
getSubPart
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
-
Field Details
-
HAS_TOP_PANEL_STYLE_NAME
- See Also:
-
TEXT_SELECTION_ENABLED_STYLE
- See Also:
-
metadataTools
-
accessManager
-
messages
-
messageTools
-
screenValidation
-
actions
-
iconResolver
-
aggregations
-
aggregatableDelegate
-
uiTestIdsSupport
-
internalStyles
-
columns
-
columnsOrder
-
columnGenerators
-
actionList
-
shortcutsDelegate
-
actionsPermissions
-
contextMenu
-
contextMenuItems
-
sortable
protected boolean sortable -
columnsCollapsingAllowed
protected boolean columnsCollapsingAllowed -
textSelectionEnabled
protected boolean textSelectionEnabled -
editorCrossFieldValidate
protected boolean editorCrossFieldValidate -
itemClickAction
-
enterPressAction
-
selectionMode
-
componentComposition
-
topPanel
protected com.vaadin.ui.CssLayout topPanel -
buttonsPanel
-
pagination
-
rowStyleProviders
-
rowDescriptionProvider
-
detailsGenerator
-
columnCollapsingChangeListenerRegistration
protected com.vaadin.shared.Registration columnCollapsingChangeListenerRegistration -
columnResizeListenerRegistration
protected com.vaadin.shared.Registration columnResizeListenerRegistration -
contextClickListenerRegistration
protected com.vaadin.shared.Registration contextClickListenerRegistration -
editorCancelListener
protected com.vaadin.shared.Registration editorCancelListener -
editorOpenListener
protected com.vaadin.shared.Registration editorOpenListener -
editorBeforeSaveListener
protected com.vaadin.shared.Registration editorBeforeSaveListener -
editorSaveListener
protected com.vaadin.shared.Registration editorSaveListener -
headerRows
-
headerAggregationRow
protected com.vaadin.ui.components.grid.HeaderRow headerAggregationRow -
showIconsForPopupMenuActions
protected boolean showIconsForPopupMenuActions -
dataBinding
-
itemDatasources
-
emptyStateClickEventHandler
-
-
Constructor Details
-
AbstractDataGrid
public AbstractDataGrid()
-
-
Method Details
-
createComponentComposition
-
createComponent
-
createShortcutsDelegate
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
setMetadataTools
-
setAccessManager
-
setMessages
-
setMessageTools
-
setThemeConstantsManager
-
setScreenValidation
-
setActions
-
setIconResolver
-
setAggregations
-
setUiTestIdsSupport
-
initComponent
-
onBeforeRefreshGridData
-
createEditorFieldFactory
-
initComponentComposition
-
onItemClick
-
onColumnReorder
protected void onColumnReorder(com.vaadin.ui.Grid.ColumnReorderEvent e) -
onSort
-
onSelectionChange
-
fireSelectionEvent
-
createEnterShortcutListener
-
getInnerComponents
- Specified by:
getInnerComponents
in interfaceHasInnerComponents
-
initEditor
-
initHeaderRows
-
getColumnsOrderInternal
-
restoreColumnsOrder
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.- Parameters:
visibleColumns
- the list of DataGrid columns, not hidden by security permissions- Returns:
- a list of all columns in DataGrid
-
restoreColumnsOrderAndUpdate
-
initContextMenu
protected void initContextMenu() -
initSidebarMenu
protected void initSidebarMenu() -
refreshActionsState
protected void refreshActionsState() -
handleDoubleClickAction
protected void handleDoubleClickAction() -
focus
public void focus()Description copied from interface:Component.Focusable
Sets focus to this component- Specified by:
focus
in interfaceComponent.Focusable
-
setLookupSelectHandler
- Specified by:
setLookupSelectHandler
in interfaceLookupComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
selectHandler
- handler that should be executed when a user select an item in the lookup screen
-
getLookupSelectedItems
- Specified by:
getLookupSelectedItems
in interfaceLookupComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- items selected in lookup component
-
getEnterAction
-
getColumns
Description copied from interface:DataGrid
Returns a copy of currently configured columns in their current visual order in this DataGrid.- Specified by:
getColumns
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- unmodifiable copy of current columns
- See Also:
-
getVisibleColumns
Description copied from interface:DataGrid
Returns a copy of columns not hidden by security permissions.- Specified by:
getVisibleColumns
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- copy of columns not hidden by security permissions
- See Also:
-
getColumn
Description copied from interface:DataGrid
Returns a column based on the Id. -
getColumnNN
Description copied from interface:DataGrid
Returns a column by its Id.- Specified by:
getColumnNN
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
id
- the column Id- Returns:
- the column with given Id
- See Also:
-
addColumn
Description copied from interface:DataGrid
Adds the given column to DataGrid. -
addColumn
Description copied from interface:DataGrid
Adds the given column at the specified index to DataGrid. -
addColumn
Description copied from interface:DataGrid
Creates new column with given Id and property, then adds this column to DataGrid.- Specified by:
addColumn
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
id
- the column IdpropertyPath
- the instance ofMetaPropertyPath
representing a relative path to a property from certain MetaClass- Returns:
- the newly created column
- See Also:
-
addColumn
Description copied from interface:DataGrid
Creates new column with given Id and property at the specified index, then adds this column to DataGrid.- Specified by:
addColumn
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
id
- the column IdpropertyPath
- the instance ofMetaPropertyPath
representing a relative path to a property from certain MetaClassindex
- index of a new column- Returns:
- the newly created column
- See Also:
-
createColumn
protected AbstractDataGrid.ColumnImpl<E> createColumn(String id, @Nullable MetaPropertyPath propertyPath, AbstractDataGrid<?, E> owner) -
addColumnInternal
-
generateColumnCaption
-
setupGridColumnProperties
protected void setupGridColumnProperties(com.vaadin.ui.Grid.Column<E, ?> gridColumn, DataGrid.Column<E> column) -
getColumnPresentationValueProvider
@Nullable protected com.vaadin.data.ValueProvider getColumnPresentationValueProvider(DataGrid.Column<E> column) -
getDefaultPresentationValueProvider
protected com.vaadin.data.ValueProvider getDefaultPresentationValueProvider(DataGrid.Column<E> column) -
getColumnRendererImplementation
protected com.vaadin.ui.renderers.Renderer getColumnRendererImplementation(DataGrid.Column<E> column) -
getDefaultRenderer
-
addColumnId
-
removeColumnId
-
removeColumn
Description copied from interface:DataGrid
Removes the given column from DataGrid or do nothing if column isnull
.- Specified by:
removeColumn
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
column
- the column to add- See Also:
-
removeColumn
Description copied from interface:DataGrid
Removes a column from DataGrid by its Id or do nothing if column is not found.- Specified by:
removeColumn
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
id
- the columns Id- See Also:
-
getItems
- Specified by:
getItems
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Specified by:
getItems
in interfaceListComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- The DataGrid source
-
getDataGridItemsNN
-
getEntityDataGridItems
-
getEntityDataGridItemsNN
-
setItems
Description copied from interface:DataGrid
Sets an instance ofDataGridItems
as the DataGrid data source. -
setUiTestId
-
createEmptyDataProvider
-
setVisibleColumns
-
getAutowiredProperties
protected Collection<MetaPropertyPath> getAutowiredProperties(EntityDataGridItems<E> entityDataGridSource) -
setupAutowiredColumns
-
createDataGridDataProvider
-
dataGridSourceItemSetChanged
- Specified by:
dataGridSourceItemSetChanged
in interfaceDataGridItemsEventsDelegate<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-
dataGridSourcePropertyValueChanged
- Specified by:
dataGridSourcePropertyValueChanged
in interfaceDataGridItemsEventsDelegate<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-
dataGridSourceStateChanged
- Specified by:
dataGridSourceStateChanged
in interfaceDataGridItemsEventsDelegate<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-
dataGridSourceSelectedItemChanged
- Specified by:
dataGridSourceSelectedItemChanged
in interfaceDataGridItemsEventsDelegate<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-
getColumnOrder
-
getCaption
- Specified by:
getCaption
in interfaceComponent.HasCaption
- Overrides:
getCaption
in classAbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the caption of the component
-
setCaption
Description copied from interface:Component.HasCaption
Sets the component's caption.- Specified by:
setCaption
in interfaceComponent.HasCaption
- Overrides:
setCaption
in classAbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
caption
- the new component's caption
-
isCaptionAsHtml
public boolean isCaptionAsHtml()- Specified by:
isCaptionAsHtml
in interfaceHasHtmlCaption
- Overrides:
isCaptionAsHtml
in classAbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
true
if the caption is rendered as HTML,false
if rendered as plain text
-
setCaptionAsHtml
public void setCaptionAsHtml(boolean captionAsHtml) Description copied from interface:HasHtmlCaption
Sets whether the caption is rendered as HTML.- Specified by:
setCaptionAsHtml
in interfaceHasHtmlCaption
- Overrides:
setCaptionAsHtml
in classAbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
captionAsHtml
-true
if the caption is rendered as HTML,false
if rendered as plain text- See Also:
-
isTextSelectionEnabled
public boolean isTextSelectionEnabled()- Specified by:
isTextSelectionEnabled
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
true
if text selection is enabled.
-
setTextSelectionEnabled
public void setTextSelectionEnabled(boolean textSelectionEnabled) Description copied from interface:DataGrid
Enable or disable text selection in DataGrid cells. Default value isfalse
.- Specified by:
setTextSelectionEnabled
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
textSelectionEnabled
- specifies whether text selection in DataGrid cells is enabled
-
isColumnReorderingAllowed
public boolean isColumnReorderingAllowed()Description copied from interface:DataGrid
Returns whether column reordering is allowed. Default value istrue
.- Specified by:
isColumnReorderingAllowed
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
true
if reordering is allowed
-
setColumnReorderingAllowed
public void setColumnReorderingAllowed(boolean columnReorderingAllowed) Description copied from interface:DataGrid
Sets whether or not column reordering is allowed. Default value istrue
.- Specified by:
setColumnReorderingAllowed
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
columnReorderingAllowed
- specifies whether column reordering is allowed
-
isSortable
public boolean isSortable()- Specified by:
isSortable
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
true
if individual column sortable attribute can be set totrue
,false
otherwise
-
setSortable
public void setSortable(boolean sortable) Description copied from interface:DataGrid
Defines if this attribute can be changed for individual column or not. Default value istrue
.- Specified by:
setSortable
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
sortable
-true
if individual column sortable attribute can be set totrue
,false
otherwise
-
isColumnsCollapsingAllowed
public boolean isColumnsCollapsingAllowed()- Specified by:
isColumnsCollapsingAllowed
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
true
if individual column collapsible attribute can be set totrue
,false
otherwise
-
setColumnsCollapsingAllowed
public void setColumnsCollapsingAllowed(boolean columnsCollapsingAllowed) Description copied from interface:DataGrid
Defines if collapsible attribute can be changed for individual column or not. Default value istrue
.- Specified by:
setColumnsCollapsingAllowed
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
columnsCollapsingAllowed
-true
if individual column collapsible attribute can be set totrue
,false
otherwise
-
isEditorEnabled
public boolean isEditorEnabled()Description copied from interface:DataGrid
Checks whether the item editor UI is enabled for this DataGrid.- Specified by:
isEditorEnabled
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
true
if the editor is enabled for this grid- See Also:
-
setEditorEnabled
public void setEditorEnabled(boolean isEnabled) Description copied from interface:DataGrid
Sets whether or not the item editor UI is enabled for this DataGrid. When the editor is enabled, the user can open it by double-clicking a row or hitting enter when a row is focused. The editor can also be opened programmatically using theDataGrid.edit(Object)
method.- Specified by:
setEditorEnabled
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
isEnabled
-true
to enable the feature,false
otherwise- See Also:
-
isEditorBuffered
public boolean isEditorBuffered()Description copied from interface:DataGrid
Gets the buffered editor mode.- Specified by:
isEditorBuffered
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
true
if buffered editor is enabled,false
otherwise
-
setEditorBuffered
public void setEditorBuffered(boolean editorBuffered) Description copied from interface:DataGrid
Sets the buffered editor mode. The default mode is buffered (true
).- Specified by:
setEditorBuffered
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
editorBuffered
-true
to enable buffered editor,false
to disable it
-
getEditorSaveCaption
Description copied from interface:DataGrid
Gets the current caption of the save button in the DataGrid editor.- Specified by:
getEditorSaveCaption
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the current caption of the save button
-
setEditorSaveCaption
Description copied from interface:DataGrid
Sets the caption on the save button in the DataGrid editor.- Specified by:
setEditorSaveCaption
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
saveCaption
- the caption to set
-
getEditorCancelCaption
Description copied from interface:DataGrid
Gets the current caption of the cancel button in the DataGrid editor.- Specified by:
getEditorCancelCaption
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the current caption of the cancel button
-
setEditorCancelCaption
Description copied from interface:DataGrid
Sets the caption on the cancel button in the DataGrid editor.- Specified by:
setEditorCancelCaption
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
cancelCaption
- the caption to set
-
getEditedItem
Description copied from interface:DataGrid
Returns the item that is currently being edited.- Specified by:
getEditedItem
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the item that is currently being edited, or
null
if no item is being edited at the moment
-
isEditorActive
public boolean isEditorActive()Description copied from interface:DataGrid
Returns whether an item is currently being edited in the editor.- Specified by:
isEditorActive
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
true
if the editor is open
-
closeEditor
public void closeEditor()Description copied from interface:DataGrid
Closes editor if it's opened.- Specified by:
closeEditor
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-
edit
Description copied from interface:DataGrid
Opens the editor interface for the provided entity. Scrolls the Grid to bring the entity to view if it is not already visible. -
editItemInternal
-
convertToJmixFields
-
addEditorOpenListener
Description copied from interface:DataGrid
Registers a new DataGrid editor open listener.- Specified by:
addEditorOpenListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
onEditorOpen
-
internalRemoveEditorOpenListener
-
addEditorCloseListener
Description copied from interface:DataGrid
Registers a new DataGrid editor close listener.- Specified by:
addEditorCloseListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
onEditorCancel
-
internalRemoveEditorCloseListener
-
addEditorPreCommitListener
Description copied from interface:DataGrid
Registers a new DataGrid editor pre commit listener. Works in buffered mode only.- Specified by:
addEditorPreCommitListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
onEditorBeforeSave
-
internalRemoveEditorPreCommitListener
protected void internalRemoveEditorPreCommitListener(Consumer<DataGrid.EditorPreCommitEvent<E>> listener) -
addEditorPostCommitListener
public Subscription addEditorPostCommitListener(Consumer<DataGrid.EditorPostCommitEvent<E>> listener) Description copied from interface:DataGrid
Registers a new DataGrid editor post commit listener. Works in buffered mode only.- Specified by:
addEditorPostCommitListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
onEditorSave
-
internalRemoveEditorPostCommitListener
protected void internalRemoveEditorPostCommitListener(Consumer<DataGrid.EditorPostCommitEvent<E>> listener) -
setEditorCrossFieldValidate
public void setEditorCrossFieldValidate(boolean validate) Description copied from interface:DataGrid
Enables cross field validation in the inline editor. True by default.- Specified by:
setEditorCrossFieldValidate
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
validate
- validate option, true if an editor should validate cross field rules
-
isEditorCrossFieldValidate
public boolean isEditorCrossFieldValidate()- Specified by:
isEditorCrossFieldValidate
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- true if editor validates cross field rules
-
createInstanceContainer
-
clearFieldDatasources
-
detachItemContainer
-
createValueSourceProvider
-
isHeaderVisible
public boolean isHeaderVisible()Description copied from interface:DataGrid
Returns the visibility of the header section.- Specified by:
isHeaderVisible
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
true
if visible,false
otherwise
-
setHeaderVisible
public void setHeaderVisible(boolean headerVisible) Description copied from interface:DataGrid
Sets the visibility of the header section.- Specified by:
setHeaderVisible
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
headerVisible
-true
to show the header section,false
to hide
-
getBodyRowHeight
public double getBodyRowHeight()Description copied from interface:DataGrid
Returns the current body row height.- Specified by:
getBodyRowHeight
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- body row height, -1 if height is AUTO
-
setBodyRowHeight
public void setBodyRowHeight(double rowHeight) Description copied from interface:DataGrid
Sets the height of a body row. If -1 (default), the row height is calculated based on the theme for an empty row before the DataGrid is displayed.- Specified by:
setBodyRowHeight
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
rowHeight
- the height of a row in pixels or -1 for AUTO
-
getHeaderRowHeight
public double getHeaderRowHeight()Description copied from interface:DataGrid
Returns the current header row height.- Specified by:
getHeaderRowHeight
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- header row height, -1 if height is AUTO
-
setHeaderRowHeight
public void setHeaderRowHeight(double rowHeight) Description copied from interface:DataGrid
Sets the body of a body row. If -1 (default), the row height is calculated based on the theme for an empty row before the DataGrid is displayed.- Specified by:
setHeaderRowHeight
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
rowHeight
- the height of a row in pixels or -1 for AUTO
-
isContextMenuEnabled
public boolean isContextMenuEnabled()- Specified by:
isContextMenuEnabled
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
true
if context menu is enabled,false
otherwise
-
setContextMenuEnabled
public void setContextMenuEnabled(boolean contextMenuEnabled) Description copied from interface:DataGrid
Sets whether or not context menu is enabled. Default value istrue
.- Specified by:
setContextMenuEnabled
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
contextMenuEnabled
- specifies whether context menu is enabled
-
getColumnResizeMode
Description copied from interface:DataGrid
Returns the current column resize mode. The default mode isDataGrid.ColumnResizeMode.ANIMATED
.- Specified by:
getColumnResizeMode
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- a ColumnResizeMode value
-
setColumnResizeMode
Description copied from interface:DataGrid
Sets the column resize mode to use. The default mode isDataGrid.ColumnResizeMode.ANIMATED
.- Specified by:
setColumnResizeMode
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
mode
- a ColumnResizeMode value
-
getSelectionMode
- Specified by:
getSelectionMode
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the currently used
DataGrid.SelectionMode
-
setSelectionMode
Description copied from interface:DataGrid
Sets the DataGrid's selection mode.- Specified by:
setSelectionMode
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
selectionMode
- the selection mode to use
-
isMultiSelect
public boolean isMultiSelect()- Specified by:
isMultiSelect
in interfaceListComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- true if multiple selection mode is enabled
-
getSingleSelected
Description copied from interface:ListComponent
Returns an instance of entity corresponding to the selected row of the list component. If nothing is selected, the method returnsnull
. If multiple selection mode is enabled, returns the first selected instance.- Specified by:
getSingleSelected
in interfaceListComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- an instance of entity corresponding to the selected row of the list component
-
getSelected
Description copied from interface:ListComponent
Returns a set of entity instances corresponding to the selected rows of the list component. If nothing is selected, the method returns aCollections.emptySet()
.- Specified by:
getSelected
in interfaceListComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- a set of entity instances corresponding to the selected rows of the list component
-
setSelected
Description copied from interface:ListComponent
Selects a row of the list component for a given entity instance.- Specified by:
setSelected
in interfaceListComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
item
- entity instance to select the row,null
to reset the selection
-
setSelected
Description copied from interface:ListComponent
Selects the rows of the list component for a given collection of entity instances.- Specified by:
setSelected
in interfaceListComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
items
- collection of entity instances to select rows
-
setSelectedItems
-
selectAll
public void selectAll()Description copied from interface:DataGrid
Marks all the items in the current data source as selected. -
deselect
Description copied from interface:DataGrid
Deselects the given item. If the item is not currently selected, does nothing. -
deselectAll
public void deselectAll()Description copied from interface:DataGrid
Deselects all the items in the current data source.- Specified by:
deselectAll
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-
sort
Description copied from interface:DataGrid
Sorts the DataGrid data for passed column id in the chosen sort direction. -
getSortOrder
- Specified by:
getSortOrder
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- sort order list
-
convertToDataGridSortOrder
protected List<DataGrid.SortOrder> convertToDataGridSortOrder(List<com.vaadin.data.provider.GridSortOrder<E>> gridSortOrder) -
addAction
Description copied from interface:ActionsHolder
Add an action to the component- Specified by:
addAction
in interfaceActionsHolder
-
addAction
Description copied from interface:ActionsHolder
Add an action to the component with index.- Specified by:
addAction
in interfaceActionsHolder
-
createContextMenuItem
-
attachAction
-
removeAction
Description copied from interface:ActionsHolder
Remove the action from the component- Specified by:
removeAction
in interfaceActionsHolder
-
removeAction
Description copied from interface:ActionsHolder
Remove the action by its ID. If there is no action with that ID, nothing happens.- Specified by:
removeAction
in interfaceActionsHolder
-
removeAllActions
public void removeAllActions()Description copied from interface:ActionsHolder
Remove all actions from the component- Specified by:
removeAllActions
in interfaceActionsHolder
-
getActions
- Specified by:
getActions
in interfaceActionsHolder
- Returns:
- unmodifiable collection of actions
-
getAction
- Specified by:
getAction
in interfaceActionsHolder
- Returns:
- an action by its ID, or null if not found
-
getActionsPermissions
- Specified by:
getActionsPermissions
in interfaceSecuredActionsHolder
- Returns:
- permissions container
-
getInitialVisibleColumns
-
getComposition
public com.vaadin.ui.Component getComposition()- Specified by:
getComposition
in interfaceComponent.Wrapper
- Overrides:
getComposition
in classAbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-
getFrozenColumnCount
public int getFrozenColumnCount()Description copied from interface:DataGrid
Gets the number of frozen columns in this DataGrid. 0 means that no data columns will be frozen, but the built-in selection checkbox column will still be frozen if it's in use. -1 means that not even the selection column is frozen. NOTE: this count includeshidden columns
in the count.- Specified by:
getFrozenColumnCount
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the number of frozen columns
- See Also:
-
setFrozenColumnCount
public void setFrozenColumnCount(int numberOfColumns) Description copied from interface:DataGrid
Sets the number of frozen columns in this grid. Setting the count to 0 means that no data columns will be frozen, but the built-in selection checkbox column will still be frozen if it's in use. Setting the count to -1 will also disable the selection column.The default value is 0.
- Specified by:
setFrozenColumnCount
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
numberOfColumns
- the number of columns that should be frozen
-
scrollTo
Description copied from interface:DataGrid
Scrolls to a certain item, usingDataGrid.ScrollDestination.ANY
. -
scrollTo
Description copied from interface:DataGrid
Scrolls to a certain item, using user-specified scroll destination. -
scrollToStart
public void scrollToStart()Description copied from interface:DataGrid
Scrolls to the first data item.- Specified by:
scrollToStart
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- See Also:
-
scrollToEnd
public void scrollToEnd()Description copied from interface:DataGrid
Scrolls to the last data item.- Specified by:
scrollToEnd
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- See Also:
-
repaint
public void repaint()Description copied from interface:DataGrid
Repaint UI representation of the DataGrid without refreshing the table data. -
canBeSorted
-
setDebugId
Description copied from interface:HasDebugId
INTERNAL. Managed by debug Id system.- Specified by:
setDebugId
in interfaceHasDebugId
- Overrides:
setDebugId
in classAbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-
setId
Description copied from interface:Component
Set component ID- Specified by:
setId
in interfaceComponent
- Overrides:
setId
in classAbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-
setStyleName
Description copied from interface:Component
Sets one or more style names of the component, replacing any previous styles. Multiple styles can be specified as a space-separated list of style names. Styles implementation is client-type-specific.- Specified by:
setStyleName
in interfaceComponent
- Overrides:
setStyleName
in classAbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
name
- one or more style names separated by space.
-
getButtonsPanel
- Specified by:
getButtonsPanel
in interfaceHasButtonsPanel
- Returns:
- a buttons panel component.
-
setButtonsPanel
Description copied from interface:HasButtonsPanel
Sets aButtonsPanel
component.- Specified by:
setButtonsPanel
in interfaceHasButtonsPanel
- Parameters:
panel
- a buttons panel component
-
getPagination
- Specified by:
getPagination
in interfaceHasPagination
- Returns:
- pagination component
-
setPagination
Description copied from interface:HasPagination
Sets pagination component.- Specified by:
setPagination
in interfaceHasPagination
-
onPaginationAfterRefresh
-
setupPaginationDataSourceProvider
public void setupPaginationDataSourceProvider() -
createTopPanel
protected com.vaadin.ui.CssLayout createTopPanel() -
updateCompositionStylesTopPanelVisible
protected void updateCompositionStylesTopPanelVisible() -
getEnterPressAction
- Specified by:
getEnterPressAction
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- an action to be executed on Enter key press, assigned by
DataGrid.setEnterPressAction(Action)
- See Also:
-
setEnterPressAction
Description copied from interface:DataGrid
Assigns an action to be executed on Enter key press.If such action is not set, the table responds to pressing Enter by trying to find and execute the following actions:
- action, assigned by
DataGrid.setItemClickAction(Action)
- action, assigned to Enter key press by setting its
shortcut
property - action named "edit"
- action named "view"
If one of these actions is found and it is enabled, it is executed.
- Specified by:
setEnterPressAction
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
action
- an action to be executed on Enter key press- See Also:
- action, assigned by
-
getItemClickAction
- Specified by:
getItemClickAction
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- an action to be executed on double click on a DataGrid row,
assigned by
DataGrid.setItemClickAction(Action)
- See Also:
-
setItemClickAction
Description copied from interface:DataGrid
Assigns an action to be executed on double click on a DataGrid row.If such action is not set, the table responds to pressing Enter by trying to find and execute the following actions:
- action, assigned to Enter key press by setting its
shortcut
property - action named "edit"
- action named "view"
If one of these actions is found and it is enabled, it is executed.
- Specified by:
setItemClickAction
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
action
- an action to be executed on double click on a DataGrid row
- action, assigned to Enter key press by setting its
-
getColumnByGridColumn
@Nullable protected AbstractDataGrid.ColumnImpl<E> getColumnByGridColumn(com.vaadin.ui.Grid.Column<E, ?> gridColumn) -
getColumnById
-
addRowStyleProvider
Description copied from interface:DataGrid
Adds style provider for the DataGrid rows.DataGrid can use several providers to obtain many style names for rows.
- Specified by:
addRowStyleProvider
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
styleProvider
- a style provider to add, not null
-
removeRowStyleProvider
Description copied from interface:DataGrid
Removes style provider for the DataGrid rows.- Specified by:
removeRowStyleProvider
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
styleProvider
- a style provider to remove, not null
-
getRowDescriptionProvider
Description copied from interface:DataGrid
Returns theRowDescriptionProvider
instance used to generate descriptions (tooltips) for DataGrid rows- Specified by:
getRowDescriptionProvider
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the description provider or null if no provider is set
-
setRowDescriptionProvider
Description copied from interface:DataGrid
Sets theRowDescriptionProvider
instance for generating optional descriptions (tooltips) for DataGrid rows. If aDataGrid.Column.setDescriptionProvider(Function)
is also set, the row description generated byprovider
is used for cells for which the cell description provider returns null.This method uses the
ContentMode.PREFORMATTED
content mode.- Specified by:
setRowDescriptionProvider
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
provider
- the description provider to use ornull
to remove a previously set provider if any
-
setRowDescriptionProvider
public void setRowDescriptionProvider(@Nullable Function<? super E, String> provider, ContentMode contentMode) Description copied from interface:DataGrid
Sets theRowDescriptionProvider
instance for generating optional descriptions (tooltips) for DataGrid rows. If aDataGrid.Column.setDescriptionProvider(Function)
is also set, the row description generated byprovider
is used for cells for which the cell description provider returns null.- Specified by:
setRowDescriptionProvider
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
provider
- the description provider to use ornull
to remove a previously set provider if anycontentMode
- the content mode for row tooltips
-
getRowDescription
-
addGeneratedColumn
public DataGrid.Column<E> addGeneratedColumn(String columnId, Function<DataGrid.ColumnGeneratorEvent<E>, ?> generator) Description copied from interface:DataGrid
Add a generated column to the DataGrid.- Specified by:
addGeneratedColumn
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
columnId
- column identifier as defined in XML descriptorgenerator
- column generator instance- See Also:
-
addGeneratedColumn
public DataGrid.Column<E> addGeneratedColumn(String columnId, Function<DataGrid.ColumnGeneratorEvent<E>, ?> generator, int index) Description copied from interface:DataGrid
Add a generated column to the DataGrid.- Specified by:
addGeneratedColumn
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
columnId
- column identifier as defined in XML descriptorgenerator
- column generator instanceindex
- index of a new generated column- See Also:
-
createGeneratedColumnValueProvider
-
getColumnGenerator
Description copied from interface:DataGrid
Gets the columns generator for the given column id.- Specified by:
getColumnGenerator
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
columnId
- the column id for which to return column generator- Returns:
- the column generator for given column id
-
copyColumnProperties
-
addColumnCollapsingChangeListener
public Subscription addColumnCollapsingChangeListener(Consumer<DataGrid.ColumnCollapsingChangeEvent> listener) Description copied from interface:DataGrid
Registers a new column collapsing change listener.- Specified by:
addColumnCollapsingChangeListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
onColumnVisibilityChanged
protected void onColumnVisibilityChanged(com.vaadin.ui.Grid.ColumnVisibilityChangeEvent e) -
internalRemoveColumnCollapsingChangeListener
protected void internalRemoveColumnCollapsingChangeListener(Consumer<DataGrid.ColumnCollapsingChangeEvent> listener) -
addColumnResizeListener
Description copied from interface:DataGrid
Registers a new column resize listener.- Specified by:
addColumnResizeListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
onColumnResize
protected void onColumnResize(com.vaadin.ui.Grid.ColumnResizeEvent e) -
internalRemoveColumnResizeListener
-
addSortListener
Description copied from interface:DataGrid
Registers a new sort order change listener- Specified by:
addSortListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
addColumnReorderListener
Description copied from interface:DataGrid
Registers a new column reorder listener.- Specified by:
addColumnReorderListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
addSelectionListener
Description copied from interface:DataGrid
Registers a new selection listener- Specified by:
addSelectionListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
addItemClickListener
Description copied from interface:DataGrid
Registers a new item click listener- Specified by:
addItemClickListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
addContextClickListener
Description copied from interface:DataGrid
Registers a new context click listener- Specified by:
addContextClickListener
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- the listener to register
-
onContextClick
protected void onContextClick(com.vaadin.event.ContextClickEvent e) -
internalRemoveContextClickListener
-
addLookupValueChangeListener
public Subscription addLookupValueChangeListener(Consumer<LookupComponent.LookupSelectionChangeEvent<E>> listener) Description copied from interface:LookupComponent.LookupSelectionChangeNotifier
Adds a listener that invoked when lookup selected items set is changed.- Specified by:
addLookupValueChangeListener
in interfaceLookupComponent.LookupSelectionChangeNotifier<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
listener
- a listener to add- Returns:
Subscription
-
getHeaderRow
Description copied from interface:DataGrid
Gets the header row at given index.- Specified by:
getHeaderRow
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
index
- 0 based index for row. Counted from top to bottom- Returns:
- header row at given index
-
getHeaderRowByGridRow
@Nullable protected DataGrid.HeaderRow getHeaderRowByGridRow(com.vaadin.ui.components.grid.HeaderRow gridRow) -
appendHeaderRow
Description copied from interface:DataGrid
Adds a new row at the bottom of the header section.- Specified by:
appendHeaderRow
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the new row
- See Also:
-
prependHeaderRow
Description copied from interface:DataGrid
Adds a new row at the top of the header section.- Specified by:
prependHeaderRow
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the new row
- See Also:
-
addHeaderRowAt
Description copied from interface:DataGrid
Inserts a new row at the given position to the header section. Shifts the row currently at that position and any subsequent rows down (adds one to their indices).- Specified by:
addHeaderRowAt
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
index
- the position at which to insert the row- Returns:
- the new row
- See Also:
-
checkHeaderIndexInRange
protected void checkHeaderIndexInRange(int index, boolean includeBounds) -
addHeaderRowInternal
protected DataGrid.HeaderRow addHeaderRowInternal(com.vaadin.ui.components.grid.HeaderRow headerRow) -
removeHeaderRow
Description copied from interface:DataGrid
Removes the given row from the header section.- Specified by:
removeHeaderRow
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
headerRow
- the row to be removed- See Also:
-
removeHeaderRow
public void removeHeaderRow(int index) Description copied from interface:DataGrid
Removes the row at the given position from the header section.- Specified by:
removeHeaderRow
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
index
- the position of the row- See Also:
-
getDefaultHeaderRow
Description copied from interface:DataGrid
Returns the current default row of the header section. The default row is a special header row providing a user interface for sorting columns. Setting a header text for column updates cells in the default header.- Specified by:
getDefaultHeaderRow
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the default row or null if no default row set
-
setDefaultHeaderRow
Description copied from interface:DataGrid
Sets the default row of the header. The default row is a special header row providing a user interface for sorting columns.- Specified by:
setDefaultHeaderRow
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
headerRow
- the new default row, or null for no default row
-
getHeaderRowCount
public int getHeaderRowCount()Description copied from interface:DataGrid
Gets the row count for the header section.- Specified by:
getHeaderRowCount
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- row count
-
getDetailsGenerator
- Specified by:
getDetailsGenerator
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- the current details generator for row details or
null
if not set
-
setDetailsGenerator
Description copied from interface:DataGrid
Sets a new details generator for row details.The currently opened row details will be re-rendered.
- Specified by:
setDetailsGenerator
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
detailsGenerator
- the details generator to set
-
getRowDetails
-
isDetailsVisible
Description copied from interface:DataGrid
Checks whether details are visible for the given item.- Specified by:
isDetailsVisible
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
entity
- the item for which to check details visibility- Returns:
true
if the details are visible
-
setDetailsVisible
Description copied from interface:DataGrid
Shows or hides the details for a specific item.- Specified by:
setDetailsVisible
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
entity
- the item for which to set details visibilityvisible
-true
to show the details, orfalse
to hide them
-
getTabIndex
public int getTabIndex()Description copied from interface:Component.Focusable
Gets the tabulator index of theHasTabIndex
component.- Specified by:
getTabIndex
in interfaceComponent.Focusable
- Returns:
- tab index set for the
HasTabIndex
component
-
setTabIndex
public void setTabIndex(int tabIndex) Description copied from interface:Component.Focusable
Sets the tabulator index of theFocusable
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.- Specified by:
setTabIndex
in interfaceComponent.Focusable
- Parameters:
tabIndex
- tab index
-
isAggregatable
public boolean isAggregatable()- Specified by:
isAggregatable
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- true if DataGrid is aggregatable
-
setAggregatable
public void setAggregatable(boolean aggregatable) Description copied from interface:DataGrid
Set to true if aggregation should be enabled. Default value is false.- Specified by:
setAggregatable
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
aggregatable
- aggregatable option
-
getAggregationPosition
- Specified by:
getAggregationPosition
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- return aggregation row position
-
setAggregationPosition
Description copied from interface:DataGrid
Sets aggregation row position. Default value isDataGrid.AggregationPosition.TOP
.- Specified by:
setAggregationPosition
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
position
- position:DataGrid.AggregationPosition.TOP
orDataGrid.AggregationPosition.BOTTOM
-
getAggregationResults
- Specified by:
getAggregationResults
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- aggregated values for columns
-
setEmptyStateMessage
Description copied from interface:DataGrid
Sets a message to the middle of DataGrid body that should be appeared when DataGrid is empty.- Specified by:
setEmptyStateMessage
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
message
- message that appears when DataGrid is empty
-
getEmptyStateMessage
- Specified by:
getEmptyStateMessage
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- message that should be appeared when DataGrid is empty
-
setEmptyStateLinkMessage
Description copied from interface:DataGrid
Sets a link message to the middle of DataGrid body that should be appeared when DataGrid is empty.- Specified by:
setEmptyStateLinkMessage
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
linkMessage
- message that appears when DataGrid is empty- See Also:
-
getEmptyStateLinkMessage
- Specified by:
getEmptyStateLinkMessage
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- link message that should be appeared when DataGrid is empty
-
setEmptyStateLinkClickHandler
public void setEmptyStateLinkClickHandler(@Nullable Consumer<DataGrid.EmptyStateClickEvent<E>> handler) Description copied from interface:DataGrid
Sets click handler for link message. Link message can be shown when DataGrid is empty.- Specified by:
setEmptyStateLinkClickHandler
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Parameters:
handler
- handler to set- See Also:
-
getMinHeight
- Specified by:
getMinHeight
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Specified by:
getMinHeight
in interfaceHasMinSize
- Returns:
min-height
CSS property value of the Grid (not a composition) ornull
if not set
-
getMinHeightSizeUnit
- Specified by:
getMinHeightSizeUnit
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Specified by:
getMinHeightSizeUnit
in interfaceHasMinSize
- Returns:
- unit size of
min-height
CSS property value of the Grid (not a composition)
-
setMinHeight
Description copied from interface:DataGrid
SetsminHeight
CSS property value to the Grid (not a composition). To set CSS properties to the composition usecss
attribute in the XML descriptor orHtmlAttributes.applyCss(Component, String)
.- Specified by:
setMinHeight
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Specified by:
setMinHeight
in interfaceHasMinSize
- Parameters:
minHeight
- property value
-
getMinWidth
- Specified by:
getMinWidth
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Specified by:
getMinWidth
in interfaceHasMinSize
- Returns:
min-width
CSS property value of the Grid (not a composition) ornull
if not set
-
getMinWidthSizeUnit
- Specified by:
getMinWidthSizeUnit
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Specified by:
getMinWidthSizeUnit
in interfaceHasMinSize
- Returns:
- unit size of
min-width
CSS property value of the Grid (not a composition)
-
setMinWidth
Description copied from interface:DataGrid
SetsminWidth
CSS property value to the Grid (not a composition). To set CSS properties to the composition usecss
attribute in the XML descriptor orHtmlAttributes.applyCss(Component, String)
.- Specified by:
setMinWidth
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Specified by:
setMinWidth
in interfaceHasMinSize
- Parameters:
minWidth
- property value
-
getEmptyStateLinkClickHandler
- Specified by:
getEmptyStateLinkClickHandler
in interfaceDataGrid<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
- Returns:
- click handler for link message
-
getAggregatableDelegate
-
__aggregate
-
__aggregateValues
-
convertAggregationKeyMapToColumnIdKeyMap
protected <V> Map<String,V> convertAggregationKeyMapToColumnIdKeyMap(Map<AggregationInfo, V> aggregationInfoMap) -
getAggregationInfos
-
checkAggregation
-
fillAggregationRow
-
initAggregationRow
protected void initAggregationRow() -
updateAggregationRow
protected void updateAggregationRow() -
removeAggregationRow
protected void removeAggregationRow() -
getColumnAggregationDescription
-
getColumnAggregationDescriptionByType
-
enableCrossFieldValidationHandling
protected void enableCrossFieldValidationHandling(boolean enable) -
validateCrossFieldRules
-
getGeneratedRowStyle
-
initEmptyState
protected void initEmptyState() -
showEmptyStateIfPossible
protected void showEmptyStateIfPossible() -
getGeneratedCellStyle
-
getGeneratedCellDescription
-
attached
public void attached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been attached.- Specified by:
attached
in interfaceAttachNotifier
- Overrides:
attached
in classAbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-
detached
public void detached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been detached.- Specified by:
detached
in interfaceAttachNotifier
- Overrides:
detached
in classAbstractComponent<C extends com.vaadin.ui.Grid<E> & JmixEnhancedGrid<E>>
-