Package io.jmix.flowui.view.impl
Class ViewActionsImpl
java.lang.Object
io.jmix.flowui.view.impl.ViewActionsImpl
- All Implemented Interfaces:
HasActions,ViewActions
@Component("flowui_ViewActions")
@Scope("prototype")
public class ViewActionsImpl
extends Object
implements ViewActions
Implementation of the
ViewActions interface for managing actions associated
with a view in the application. This class provides methods to add, remove, and retrieve actions
tied to a specific view. It also handles action shortcuts and their lifecycle.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an action to the component at the specified index.protected voidaddActionInternal(Action action, int index) protected voidaddShortcutListenerIfNeeded(Action action) protected voidattachAction(Action action) protected voiddetachAction(Action action) @Nullable ActionReturns an action with passed id.protected View<?> getView()voidremoveAction(Action action) Removes the action from the component.protected voidremoveActionInternal(Action action) protected voidremoveShortcutListener(Action action) protected <C extends com.vaadin.flow.component.Component>
com.vaadin.flow.component.ShortcutRegistrationshortcutHandler(C viewLayout, com.vaadin.flow.component.ShortcutEventListener shortcutEventListener, KeyCombination keyCombination) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.flowui.kit.component.HasActions
addAction, removeAction, removeAllActions
-
Field Details
-
view
-
actions
-
actionShortcutBinding
-
-
Constructor Details
-
ViewActionsImpl
-
-
Method Details
-
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
-
addActionInternal
-
removeAction
Description copied from interface:HasActionsRemoves the action from the component.- Specified by:
removeActionin interfaceHasActions- Parameters:
action- action to remove
-
removeActionInternal
-
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
-
getActionInternal
-
shortcutHandler
protected <C extends com.vaadin.flow.component.Component> com.vaadin.flow.component.ShortcutRegistration shortcutHandler(C viewLayout, com.vaadin.flow.component.ShortcutEventListener shortcutEventListener, KeyCombination keyCombination) -
getView
-
attachAction
-
addShortcutListenerIfNeeded
-
removeShortcutListener
-
detachAction
-
getActionShortcutBinding
-