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 Actionprotected com.vaadin.flow.shared.Registrationprotected final GridMenuItemActionWrapper<?>protected booleanprotected com.vaadin.flow.shared.Registration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.component.ComponentcreateShortcutComponent(KeyCombination keyCombination) protected booleanprotected booleanprotected voidprotected voidvoidSets theActionfor this menu item and optionally configures it to override the component properties such as text, tooltip, enabled state, and icon.voidSets theActionfor 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 theActionfor 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, ornullto remove the current action
-
setAction
Sets theActionfor 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, ornullto 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
-