Class JmixGroupGrid<T>
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<Grid<T>>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.Focusable<Grid<T>>,com.vaadin.flow.component.FocusNotifier<Grid<T>>,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,com.vaadin.flow.data.event.SortEvent.SortNotifier<Grid<T>,,GridSortOrder<T>> com.vaadin.flow.data.provider.HasDataGenerators<T>,com.vaadin.flow.data.provider.HasDataView<T,,Void, GridDataView<T>> com.vaadin.flow.data.provider.HasLazyDataView<T,,Void, GridLazyDataView<T>> com.vaadin.flow.data.provider.HasListDataView<T,,GridListDataView<T>> com.vaadin.flow.data.provider.hierarchy.HasHierarchicalDataProvider<T>,HasActions,HasSubParts,SelectionChangeNotifier<Grid<T>,,T> Serializable
- Direct Known Subclasses:
GroupDataGrid
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classprotected static classprotected static classNested classes/interfaces inherited from class io.jmix.groupgridflowui.kit.vaadin.grid.Grid
Grid.AbstractGridExtension<T>, Grid.Column<T>, Grid.DataCommunicatorBuilder<T,U extends com.vaadin.flow.data.provider.ArrayUpdater>, Grid.DetailsManager, Grid.MultiSortPriority, Grid.NestedNullBehavior, Grid.SelectionMode, Grid.SpringData, Grid.UpdateQueue Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an action to the component.voidAdd an action to the component at the specified index.com.vaadin.flow.shared.RegistrationaddItemClickListener(com.vaadin.flow.component.ComponentEventListener<ItemClickEvent<T>> listener) Adds an item click listener to this component.com.vaadin.flow.shared.RegistrationaddItemDoubleClickListener(com.vaadin.flow.component.ComponentEventListener<ItemDoubleClickEvent<T>> listener) Adds an item double click listener to this component.protected voidcollapse(Collection<T> items, boolean userOriginated) protected JmixGroupGridActionsSupport<JmixGroupGrid<T>,T> protected GridArrayUpdatercreateDefaultArrayUpdater(com.vaadin.flow.function.SerializableBiFunction<GridArrayUpdater.UpdateQueueData, Integer, Grid.UpdateQueue> updateQueueFactory) protected Grid<T>.DetailsManagerprotected voidexpand(Collection<T> items, boolean userOriginated) protected voidfireCollapseEvent(Collection<T> expandedItems, boolean userOriginated) protected voidfireExpandEvent(Collection<T> collapsedItems, boolean userOriginated) protected voidgenerateSelectableData(T item, elemental.json.JsonObject jsonObject) Returns an action with passed id.com.vaadin.flow.data.provider.hierarchy.HierarchicalDataCommunicator<T>Returns the data communicator of this Grid.com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T,com.vaadin.flow.function.SerializablePredicate<T>> Returns the data provider of this grid.Deprecated.not supportedDeprecated.not supportedDeprecated.not supportedgetSubPart(String name) Returns a sub part object by its name.voidremoveAction(Action action) Removes the action from the component.voidScrolls to the last data row of the grid.voidscrollToIndex(int rowIndex) Scrolls to the index of an item in the root level of the tree.voidscrollToIndex(int... indexes) Scrolls to a nested item within the tree.voidscrollToItem(T item) Deprecated.usescrollToIndex(int...)instead.voidsetDataProvider(com.vaadin.flow.data.provider.DataProvider<T, ?> dataProvider) Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.voidsetDataProvider(com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T, ?> hierarchicalDataProvider) Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.setItems(Collection<T> items) Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.Methods inherited from class io.jmix.groupgridflowui.kit.vaadin.grid.Grid
addCellFocusListener, addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumnReorderListener, addColumnResizeListener, addColumns, addComponentColumn, addContextMenu, addDataGenerator, addDragEndListener, addDragStartListener, addDropListener, addFirstHeaderRow, addSelectionListener, addSortListener, addThemeVariants, addValueProvider, appendFooterRow, appendHeaderRow, asMultiSelect, asSingleSelect, compareMaybeComparables, configureBeanType, createColumn, createColumnId, createEditor, createSortingComparator, deselect, deselectAll, generatePartData, getAriaLabel, getArrayUpdater, getBeanType, getClassNameGenerator, getColumnByInternalId, getColumnByKey, getColumnLayers, getColumnRendering, getColumns, getDefaultColumnFactory, getDragFilter, getDropFilter, getDropMode, getEditor, getEmptyStateComponent, getEmptyStateText, getFooterRows, getHeaderRows, getNestedNullBehavior, getPageSize, getPartNameGenerator, getPropertySet, getSelectedItems, getSelectionMode, getSelectionModel, getSelectionPreservationMode, getSortOrder, getTooltipPosition, getUniqueKeyProperty, getUniqueKeyProvider, initConnector, insertColumnLayer, isAllRowsVisible, isColumnReorderingAllowed, isDetailsVisible, isDetailsVisibleOnClick, isMultiSort, isRowsDraggable, onAttach, onDataProviderChange, onDetach, onEnabledStateChanged, prependFooterRow, prependHeaderRow, recalculateColumnWidths, removeAllColumns, removeAllFooterRows, removeAllHeaderRows, removeColumn, removeColumnByKey, removeColumnLayer, removeColumns, removeFooterRow, removeHeaderRow, removeThemeVariants, scrollToStart, select, setAllRowsVisible, setAriaLabel, setClassNameGenerator, setColumnKey, setColumnOrder, setColumnOrder, setColumnRendering, setColumnReorderingAllowed, setColumns, setDefaultMultiSortPriority, setDetailsVisible, setDetailsVisibleOnClick, setDragDataGenerator, setDragFilter, setDropFilter, setDropMode, setEmptyStateComponent, setEmptyStateText, setItemDetailsRenderer, setItems, setItems, setItemSelectableProvider, setItemsPageable, setItemsPageable, setMultiSort, setMultiSort, setMultiSort, setMultiSort, setNestedNullBehavior, setPageSize, setPartNameGenerator, setRowsDraggable, setSelectionDragDetails, setSelectionMode, setSelectionModel, setSelectionPreservationMode, setSortableColumns, setTooltipGenerator, setTooltipPosition, setUniqueKeyProperty, setUniqueKeyProvider, sort, updateSelectionModeOnClientMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface io.jmix.flowui.kit.component.HasActions
removeAction, removeAllActionsMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.data.provider.hierarchy.HasHierarchicalDataProvider
getTreeData, setItems, setItems, setTreeDataMethods inherited from interface com.vaadin.flow.data.provider.HasLazyDataView
setItemsMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface io.jmix.flowui.kit.component.SelectionChangeNotifier
addSelectionListener
-
Field Details
-
actionsSupport
-
-
Constructor Details
-
JmixGroupGrid
public JmixGroupGrid()
-
-
Method Details
-
addAction
Description copied from interface:HasActionsAdd an action to the component.- Specified by:
addActionin interfaceHasActions- Parameters:
action- action to add
-
addAction
Description copied from interface:HasActionsAdd an action to the component at the specified index.- Specified by:
addActionin interfaceHasActions- Parameters:
action- action to addindex- index at which the specified action is to be added
-
removeAction
Description copied from interface:HasActionsRemoves the action from the component.- Specified by:
removeActionin interfaceHasActions- Parameters:
action- action to remove
-
getActions
- Specified by:
getActionsin interfaceHasActions- Returns:
- unmodifiable collection of actions
-
getAction
Description copied from interface:HasActionsReturns an action with passed id.- Specified by:
getActionin interfaceHasActions- Parameters:
id- id of the action to find- Returns:
- an action by its id, or
nullif not found
-
getActionsSupport
- Returns:
- the actions support instance for the grid
-
getSubPart
Description copied from interface:HasSubPartsReturns a sub part object by its name.- Specified by:
getSubPartin interfaceHasSubParts- Parameters:
name- sub part name, e.g. component id- Returns:
- a sub part object by its name, or
nullif not found
-
getDataCommunicator
public com.vaadin.flow.data.provider.hierarchy.HierarchicalDataCommunicator<T> getDataCommunicator()Description copied from class:GridReturns the data communicator of this Grid.- Overrides:
getDataCommunicatorin classGrid<T>- Returns:
- the data communicator, not
null
-
addItemClickListener
public com.vaadin.flow.shared.Registration addItemClickListener(com.vaadin.flow.component.ComponentEventListener<ItemClickEvent<T>> listener) Description copied from class:GridAdds an item click listener to this component.- Overrides:
addItemClickListenerin classGrid<T>- Parameters:
listener- the listener to add, notnull- Returns:
- a handle that can be used for removing the listener
- See Also:
-
addItemDoubleClickListener
public com.vaadin.flow.shared.Registration addItemDoubleClickListener(com.vaadin.flow.component.ComponentEventListener<ItemDoubleClickEvent<T>> listener) Description copied from class:GridAdds an item double click listener to this component.Note that double click event happens along with a click event. It means there is no way to get a double click event only (double click without a click): a click listener added using
Grid.addItemClickListener(ComponentEventListener)(if any) will also be notified about a click event once a double click event is fired.Double click event type is not fully supported by the mobile browsers which means that double click event might not work (double click listeners won't be notified) for such browsers.
- Overrides:
addItemDoubleClickListenerin classGrid<T>- Parameters:
listener- the listener to add, notnull- Returns:
- a handle that can be used for removing the listener
- See Also:
-
getDataProvider
public com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T,com.vaadin.flow.function.SerializablePredicate<T>> getDataProvider()Description copied from class:GridReturns the data provider of this grid.To get information and control over the items in the grid, use either
Grid.getListDataView()orGrid.getLazyDataView()instead.- Specified by:
getDataProviderin interfacecom.vaadin.flow.data.provider.hierarchy.HasHierarchicalDataProvider<T>- Overrides:
getDataProviderin classGrid<T>- Returns:
- the data provider of this grid, not
null
-
setDataProvider
public void setDataProvider(com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider<T, ?> hierarchicalDataProvider) - Specified by:
setDataProviderin interfacecom.vaadin.flow.data.provider.hierarchy.HasHierarchicalDataProvider<T>
-
setDataProvider
@Deprecated public void setDataProvider(com.vaadin.flow.data.provider.DataProvider<T, ?> dataProvider) Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.Group grid only supports hierarchical data providers. UsesetDataProvider(HierarchicalDataProvider)instead.This method is inherited from Grid and has been marked as deprecated to indicate that it is not supported. This method will throw an
UnsupportedOperationException.- Overrides:
setDataProviderin classGrid<T>- Parameters:
dataProvider- the data provider
-
setItems
@Deprecated public GridLazyDataView<T> setItems(com.vaadin.flow.data.provider.BackEndDataProvider<T, Void> dataProvider) Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.Group grid does not support data views. UsesetDataProvider(HierarchicalDataProvider)instead.This method is inherited from Grid and has been marked as deprecated to indicate that it is not supported. This method will throw an
UnsupportedOperationException. -
setItems
@Deprecated public GridLazyDataView<T> setItems(com.vaadin.flow.data.provider.CallbackDataProvider.FetchCallback<T, Void> fetchCallback) Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.Group grid supports only hierarchical data so use another method instead.This method is inherited from Grid and has been marked as deprecated to indicate that it is not supported. This method will throw an
UnsupportedOperationException.- Specified by:
setItemsin interfacecom.vaadin.flow.data.provider.HasLazyDataView<T,Void, GridLazyDataView<T>> - Parameters:
fetchCallback- the fetch callback- Returns:
- the data view
-
setItems
@Deprecated public GridListDataView<T> setItems(com.vaadin.flow.data.provider.ListDataProvider<T> dataProvider) Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.Group grid supports only hierarchical data providers so use another method instead.This method is inherited from Grid and has been marked as deprecated to indicate that it is not supported. This method will throw an
UnsupportedOperationException. -
setItems
Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.Group grid supports only hierarchical data so use another method instead.This method is inherited from Grid and has been marked as deprecated to indicate that it is not supported. This method will throw an
UnsupportedOperationException.- Specified by:
setItemsin interfacecom.vaadin.flow.data.provider.HasListDataView<T,GridListDataView<T>> - Parameters:
items- the items to display, notnull- Returns:
- the data view
-
setItems
Deprecated.usesetDataProvider(HierarchicalDataProvider),HasHierarchicalDataProvider.setItems(Collection, ValueProvider),HasHierarchicalDataProvider.setItems(Stream, ValueProvider)orHasHierarchicalDataProvider.setTreeData(TreeData)instead.Group grid supports only hierarchical data, so use another method instead.This method is inherited from Grid and has been marked as deprecated to indicate that it is not supported. This method will throw an
UnsupportedOperationException.- Specified by:
setItemsin interfacecom.vaadin.flow.data.provider.HasListDataView<T,GridListDataView<T>> - Parameters:
items- the items to display, notnull- Returns:
- the data view
-
getListDataView
Deprecated.not supportedGroup grid does not support list data view.This method is inherited from Grid and has been marked as deprecated to indicate that it is not supported. This method will throw an
UnsupportedOperationException.- Specified by:
getListDataViewin interfacecom.vaadin.flow.data.provider.HasListDataView<T,GridListDataView<T>> - Overrides:
getListDataViewin classGrid<T>- Returns:
- exception is thrown
-
getLazyDataView
Deprecated.not supportedGroup grid does not support list data view.This method is inherited from Grid and has been marked as deprecated to indicate that it is not supported. This method will throw an
UnsupportedOperationException.- Specified by:
getLazyDataViewin interfacecom.vaadin.flow.data.provider.HasLazyDataView<T,Void, GridLazyDataView<T>> - Overrides:
getLazyDataViewin classGrid<T>- Returns:
- an exception is thrown
-
getGenericDataView
Deprecated.not supportedGroup grid does not support list data view.This method is inherited from Grid and has been marked as deprecated to indicate that it is not supported. This method will throw an
UnsupportedOperationException.- Specified by:
getGenericDataViewin interfacecom.vaadin.flow.data.provider.HasDataView<T,Void, GridDataView<T>> - Overrides:
getGenericDataViewin classGrid<T>- Returns:
- an exception is thrown
- See Also:
-
scrollToIndex
public void scrollToIndex(int rowIndex) Scrolls to the index of an item in the root level of the tree. To scroll to a nested item, usescrollToIndex(int...).Scrolls so that the row is shown at the start of the visible area whenever possible.
If the index parameter exceeds current item set size the grid will scroll to the end.
- Overrides:
scrollToIndexin classGrid<T>- Parameters:
rowIndex- zero-based index of the item in the root level of the tree- See Also:
-
scrollToIndex
public void scrollToIndex(int... indexes) Scrolls to a nested item within the tree.The `indexes` parameter can be either a single number or multiple numbers. The grid will first try to scroll to the item at the first index in the root level of the tree. In case the item at the first index is expanded, the grid will then try scroll to the item at the second index within the children of the expanded first item, and so on. Each given index points to a child of the item at the previous index.
- Parameters:
indexes- zero-based row indexes to scroll to- See Also:
-
scrollToEnd
public void scrollToEnd()Description copied from class:GridScrolls to the last data row of the grid.- Overrides:
scrollToEndin classGrid<T>
-
scrollToItem
Deprecated.usescrollToIndex(int...)instead.Group grid does not support scrolling to a given item. UsescrollToIndex(int...)instead.This method is inherited from Grid and has been marked as deprecated to indicate that it is not supported. This method will throw an
UnsupportedOperationException.- Overrides:
scrollToItemin classGrid<T>- Parameters:
item- the item to scroll to
-
getDefaultHeaderRow
- Overrides:
getDefaultHeaderRowin classGrid<T>- Returns:
- a default header row
-
createActionsSupport
-
createDefaultArrayUpdater
protected GridArrayUpdater createDefaultArrayUpdater(com.vaadin.flow.function.SerializableBiFunction<GridArrayUpdater.UpdateQueueData, Integer, Grid.UpdateQueue> updateQueueFactory) - Overrides:
createDefaultArrayUpdaterin classGrid<T>
-
generateSelectableData
- Overrides:
generateSelectableDatain classGrid<T>
-
createDetailsManager
- Overrides:
createDetailsManagerin classGrid<T>
-
expand
-
collapse
-
fireExpandEvent
-
fireCollapseEvent
-