Class AbstractActionsHolderComponent<T extends com.vaadin.ui.AbstractComponent & com.vaadin.event.Action.ShortcutNotifier>

java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractActionsHolderComponent<T>
All Implemented Interfaces:
ActionsHolder, AttachNotifier, Component, Component.BelongToFrame, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper, HasContextHelp, HasDebugId, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, HasSubParts, SecuredActionsHolder
Direct Known Subclasses:
AbstractTable

public abstract class AbstractActionsHolderComponent<T extends com.vaadin.ui.AbstractComponent & com.vaadin.event.Action.ShortcutNotifier> extends AbstractComponent<T> implements SecuredActionsHolder
Base class for action holders with shortcuts support
  • Field Details

    • actionList

      protected List<Action> actionList
    • actionButtons

      protected Map<Action,JmixButton> actionButtons
    • contextMenuPopup

      protected com.vaadin.ui.VerticalLayout contextMenuPopup
    • shortcutsDelegate

      protected ShortcutsDelegate<com.vaadin.event.ShortcutListener> shortcutsDelegate
    • actionsPermissions

      protected ActionsPermissions actionsPermissions
    • showIconsForPopupMenuActions

      protected boolean showIconsForPopupMenuActions
    • actionPropertyChangeListener

      protected Consumer<PropertyChangeEvent> actionPropertyChangeListener
  • Constructor Details

    • AbstractActionsHolderComponent

      protected AbstractActionsHolderComponent()
  • Method Details

    • createContextMenuPopup

      protected com.vaadin.ui.VerticalLayout createContextMenuPopup()
    • initContextMenuPopup

      protected void initContextMenuPopup(com.vaadin.ui.VerticalLayout contextMenuPopup)
    • createShortcutsDelegate

      protected ShortcutsDelegate<com.vaadin.event.ShortcutListener> createShortcutsDelegate()
    • actionPropertyChanged

      protected void actionPropertyChanged(PropertyChangeEvent evt)
    • setContextMenuButtonCaption

      protected void setContextMenuButtonCaption(JmixButton button, @Nullable String caption, @Nullable KeyCombination shortcutCombination)
    • setContextMenuButtonIcon

      protected void setContextMenuButtonIcon(JmixButton button, @Nullable String icon)
    • setContextMenuButtonAction

      protected void setContextMenuButtonAction(JmixButton button, Action action)
    • beforeContextMenuButtonHandlerPerformed

      protected void beforeContextMenuButtonHandlerPerformed()
    • setThemeConstantsManager

      @Autowired public void setThemeConstantsManager(ThemeConstantsManager themeConstantsManager)
    • addAction

      public void addAction(Action action)
      Description copied from interface: ActionsHolder
      Add an action to the component
      Specified by:
      addAction in interface ActionsHolder
    • addAction

      public void addAction(Action action, int index)
      Description copied from interface: ActionsHolder
      Add an action to the component with index.
      Specified by:
      addAction in interface ActionsHolder
    • initContextMenuButton

      protected void initContextMenuButton(JmixButton contextMenuButton, Action action)
    • attachAction

      protected void attachAction(Action action)
    • createContextMenuButton

      protected abstract JmixButton createContextMenuButton()
    • removeAction

      public void removeAction(Action action)
      Description copied from interface: ActionsHolder
      Remove the action from the component
      Specified by:
      removeAction in interface ActionsHolder
    • removeAction

      public void removeAction(String id)
      Description copied from interface: ActionsHolder
      Remove the action by its ID. If there is no action with that ID, nothing happens.
      Specified by:
      removeAction in interface ActionsHolder
    • removeAllActions

      public void removeAllActions()
      Description copied from interface: ActionsHolder
      Remove all actions from the component
      Specified by:
      removeAllActions in interface ActionsHolder
    • getActions

      public Collection<Action> getActions()
      Specified by:
      getActions in interface ActionsHolder
      Returns:
      unmodifiable collection of actions
    • getAction

      @Nullable public Action getAction(String id)
      Specified by:
      getAction in interface ActionsHolder
      Returns:
      an action by its ID, or null if not found
    • getActionsPermissions

      public ActionsPermissions getActionsPermissions()
      Specified by:
      getActionsPermissions in interface SecuredActionsHolder
      Returns:
      permissions container