Class AbstractActionsHolderSupport<C extends com.vaadin.flow.component.Component>
java.lang.Object
io.jmix.flowui.kit.component.delegate.AbstractActionsHolderSupport<C>
- Type Parameters:
C- the type of the component that holds actions
- Direct Known Subclasses:
FragmentActionsDelegate,GenericFilterActionsSupport,GridActionsSupport,JmixGroupGridActionsSupport,JmixKanbanActionsSupport,MainTabSheetActionsSupport,ValuePickerActionSupport
public abstract class AbstractActionsHolderSupport<C extends com.vaadin.flow.component.Component>
extends Object
Abstract base class for managing and binding actions to a component. This class provides
support for adding, removing, and managing
Action instances associated with a
component, while also handling shortcut registrations and property change listeners for
these actions.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds anActionto the collection of actions at the default position.voidAdds anActionto the collection of actions at the specified position.protected voidaddActionInternal(Action action, int index) protected voidaddShortcutListenerIfNeeded(Action action) protected voidattachAction(Action action) protected voiddetachAction(Action action) Finds anActionby its identifier.Returns a collection of all actions associated with this instance.protected com.vaadin.flow.component.ComponentvoidremoveAction(Action action) Removes the specifiedActionfrom the collection of actions.protected booleanremoveActionInternal(Action action) protected voidremoveShortcutListener(Action action)
-
Field Details
-
component
-
actions
-
actionShortcutBinding
-
-
Constructor Details
-
AbstractActionsHolderSupport
-
-
Method Details
-
addAction
Adds anActionto the collection of actions at the default position.- Parameters:
action- the action to be added; must not be null
-
addAction
Adds anActionto the collection of actions at the specified position.- Parameters:
action- the action to be added; must not be nullindex- the position at which the specified action is to be inserted; if the action already exists, it will be moved to the new position
-
addActionInternal
-
attachAction
-
addShortcutListenerIfNeeded
-
getShortcutLifecycleOwner
protected com.vaadin.flow.component.Component getShortcutLifecycleOwner() -
removeShortcutListener
-
removeAction
Removes the specifiedActionfrom the collection of actions.- Parameters:
action- the action to be removed; must not be null
-
removeActionInternal
-
detachAction
-
getAction
Finds anActionby its identifier.- Parameters:
id- the identifier of the action to retrieve; must not be null- Returns:
- an
Optionalcontaining the foundAction, orOptional.empty()if no action with the specified identifier exists
-
getActions
Returns a collection of all actions associated with this instance.- Returns:
- an unmodifiable collection of
Actionobjects
-
getActionShortcutBinding
-