Class GridMenuItemActionSupport
java.lang.Object
io.jmix.flowui.kit.component.grid.GridMenuItemActionSupport
- Direct Known Subclasses:
DataGridMenuItemActionSupport
A helper class that enhances the behavior of a menu item in the context of a grid or data table
by associating it with an
Action
. It synchronizes the properties and behavior of the menu item
with the associated action and handles user interactions through action listeners.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Action
protected com.vaadin.flow.shared.Registration
protected final GridMenuItemActionWrapper<?>
protected boolean
protected com.vaadin.flow.shared.Registration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.component.Component
createShortcutComponent
(KeyCombination keyCombination) protected boolean
protected boolean
protected void
protected void
void
Sets theAction
for this menu item and optionally configures it to override the component properties such as text, tooltip, enabled state, and icon.void
Sets theAction
for this menu item and optionally configures it to override the component properties such as text, tooltip, enabled state, and icon.protected void
-
Field Details
-
action
-
overrideComponentProperties
protected boolean overrideComponentProperties -
registration
protected com.vaadin.flow.shared.Registration registration -
actionPropertyChangeRegistration
protected com.vaadin.flow.shared.Registration actionPropertyChangeRegistration
-
Constructor Details
-
GridMenuItemActionSupport
-
-
Method Details
-
getAction
-
setAction
Sets theAction
for this menu item and optionally configures it to override the component properties such as text, tooltip, enabled state, and icon.- Parameters:
action
- the action to set, ornull
to remove the current action
-
setAction
Sets theAction
for this menu item and optionally configures it to override the component properties such as text, tooltip, enabled state, and icon.- Parameters:
action
- the action to set, ornull
to remove the current actionoverrideComponentProperties
- whether the action should override the component's properties
-
isShowActionIconEnabled
protected boolean isShowActionIconEnabled() -
isShowActionShortcutEnabled
protected boolean isShowActionShortcutEnabled() -
createShortcutComponent
@Nullable protected com.vaadin.flow.component.Component createShortcutComponent(@Nullable KeyCombination keyCombination) -
updateVisible
protected void updateVisible() -
removeRegistrations
protected void removeRegistrations() -
propertyChangeEventListener
-