Package io.jmix.ui.component.impl
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map<Action,
JmixButton> protected Consumer<PropertyChangeEvent>
protected ActionsPermissions
protected com.vaadin.ui.VerticalLayout
protected ShortcutsDelegate<com.vaadin.event.ShortcutListener>
protected boolean
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
Add an action to the componentvoid
Add an action to the component with index.protected void
attachAction
(Action action) protected void
protected abstract JmixButton
protected com.vaadin.ui.VerticalLayout
protected ShortcutsDelegate<com.vaadin.event.ShortcutListener>
protected void
initContextMenuButton
(JmixButton contextMenuButton, Action action) protected void
initContextMenuPopup
(com.vaadin.ui.VerticalLayout contextMenuPopup) void
removeAction
(Action action) Remove the action from the componentvoid
removeAction
(String id) Remove the action by its ID.void
Remove all actions from the componentprotected void
setContextMenuButtonAction
(JmixButton button, Action action) protected void
setContextMenuButtonCaption
(JmixButton button, String caption, KeyCombination shortcutCombination) protected void
setContextMenuButtonIcon
(JmixButton button, String icon) void
setThemeConstantsManager
(ThemeConstantsManager themeConstantsManager) Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.ActionsHolder
getActionNN, getSubPart
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
-
Field Details
-
actionList
-
actionButtons
-
contextMenuPopup
protected com.vaadin.ui.VerticalLayout contextMenuPopup -
shortcutsDelegate
-
actionsPermissions
-
showIconsForPopupMenuActions
protected boolean showIconsForPopupMenuActions -
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
-
actionPropertyChanged
-
setContextMenuButtonCaption
protected void setContextMenuButtonCaption(JmixButton button, @Nullable String caption, @Nullable KeyCombination shortcutCombination) -
setContextMenuButtonIcon
-
setContextMenuButtonAction
-
beforeContextMenuButtonHandlerPerformed
protected void beforeContextMenuButtonHandlerPerformed() -
setThemeConstantsManager
-
addAction
Description copied from interface:ActionsHolder
Add an action to the component- Specified by:
addAction
in interfaceActionsHolder
-
addAction
Description copied from interface:ActionsHolder
Add an action to the component with index.- Specified by:
addAction
in interfaceActionsHolder
-
initContextMenuButton
-
attachAction
-
createContextMenuButton
-
removeAction
Description copied from interface:ActionsHolder
Remove the action from the component- Specified by:
removeAction
in interfaceActionsHolder
-
removeAction
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 interfaceActionsHolder
-
removeAllActions
public void removeAllActions()Description copied from interface:ActionsHolder
Remove all actions from the component- Specified by:
removeAllActions
in interfaceActionsHolder
-
getActions
- Specified by:
getActions
in interfaceActionsHolder
- Returns:
- unmodifiable collection of actions
-
getAction
- Specified by:
getAction
in interfaceActionsHolder
- Returns:
- an action by its ID, or null if not found
-
getActionsPermissions
- Specified by:
getActionsPermissions
in interfaceSecuredActionsHolder
- Returns:
- permissions container
-