Class GridActionsSupport<C extends com.vaadin.flow.component.grid.Grid<T>,T>
java.lang.Object
io.jmix.flowui.kit.component.delegate.AbstractActionsHolderSupport<C>
io.jmix.flowui.kit.component.grid.GridActionsSupport<C,T>
- Type Parameters:
C
- the type of grid componentT
- the type of items within the grid
- Direct Known Subclasses:
DataGridActionsSupport
public class GridActionsSupport<C extends com.vaadin.flow.component.grid.Grid<T>,T>
extends AbstractActionsHolderSupport<C>
A support class for managing actions in grids, providing functionality for binding
actions to grid components and displaying them in a context menu.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<Action,
GridMenuItemActionWrapper<T>> protected JmixGridContextMenu<T>
protected boolean
Fields inherited from class io.jmix.flowui.kit.component.delegate.AbstractActionsHolderSupport
actions, actionShortcutBinding, component
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addActionInternal
(Action action, int index) protected void
addContextMenuItem
(Action action) protected GridMenuItemActionWrapper<T>
protected JmixGridContextMenu<T>
protected void
boolean
protected boolean
removeActionInternal
(Action action) protected void
removeContextMenuItem
(Action action) void
setShowActionsInContextMenuEnabled
(boolean showActionsInContextMenuEnabled) Enables or disables the display of actions in the grid's context menu.protected void
Methods inherited from class io.jmix.flowui.kit.component.delegate.AbstractActionsHolderSupport
addAction, addAction, addShortcutListenerIfNeeded, attachAction, detachAction, getAction, getActions, getActionShortcutBinding, getShortcutLifecycleOwner, removeAction, removeShortcutListener
-
Field Details
-
actionBinding
-
contextMenu
-
showActionsInContextMenuEnabled
protected boolean showActionsInContextMenuEnabled
-
-
Constructor Details
-
GridActionsSupport
-
-
Method Details
-
addActionInternal
- Overrides:
addActionInternal
in classAbstractActionsHolderSupport<C extends com.vaadin.flow.component.grid.Grid<T>>
-
addContextMenuItem
-
createContextMenuItemComponent
-
getContextMenu
-
initContextMenu
protected void initContextMenu() -
updateContextMenu
protected void updateContextMenu() -
removeActionInternal
- Overrides:
removeActionInternal
in classAbstractActionsHolderSupport<C extends com.vaadin.flow.component.grid.Grid<T>>
-
removeContextMenuItem
-
isShowActionsInContextMenuEnabled
public boolean isShowActionsInContextMenuEnabled()- Returns:
true
if actions are shown in the grid context menu,false
otherwise
-
setShowActionsInContextMenuEnabled
public void setShowActionsInContextMenuEnabled(boolean showActionsInContextMenuEnabled) Enables or disables the display of actions in the grid's context menu.- Parameters:
showActionsInContextMenuEnabled
- a boolean flag indicating whether actions should be displayed in the context menu. Iftrue
, actions will be shown; iffalse
, they will be hidden
-