Package io.jmix.flowui.action
Class ObservableBaseAction<A extends ObservableBaseAction<A>>
java.lang.Object
io.jmix.flowui.kit.action.AbstractAction
io.jmix.flowui.kit.action.BaseAction
io.jmix.flowui.action.ObservableBaseAction<A>
- All Implemented Interfaces:
Action,HasShortcutCombination
- Direct Known Subclasses:
LogoutAction,PropertyFilter.OperationChangeAction,SecuredBaseAction,SubstituteUserAction,TabbedViewsContainerAction
Base implementation of
Action that introduces execution observation support.- See Also:
-
Field Summary
FieldsFields inherited from class io.jmix.flowui.kit.action.BaseAction
enabledExplicitly, visibleExplicitlyFields inherited from class io.jmix.flowui.kit.action.AbstractAction
description, enabled, eventBus, icon, id, shortcutCombination, text, variant, visibleFields inherited from interface io.jmix.flowui.kit.action.Action
PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT_COMBINATION, PROP_TEXT, PROP_VARIANT, PROP_VISIBLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerform(com.vaadin.flow.component.Component component) Executes action logic.protected Optional<UiObservationSupport>withDescription(String description) Sets the description property value of an action.withEnabled(boolean enabled) Sets the enabled property value of an action.withHandler(Consumer<ActionPerformedEvent> handler) Adds a listener to be notified when action is performed.withIcon(com.vaadin.flow.component.Component icon) Sets the icon property value of an action.withIcon(com.vaadin.flow.component.icon.Icon icon) Deprecated, for removal: This API element is subject to removal in a future version.withShortcutCombination(KeyCombination shortcutCombination) Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.Sets the text property value of an action.withVariant(ActionVariant variant) Sets the variant property value of an action.withVisible(boolean visible) Sets the visible property value of an action.Methods inherited from class io.jmix.flowui.kit.action.BaseAction
addActionPerformedListener, isApplicable, refreshState, setEnabled, setEnabledInternal, setVisible, setVisibleInternal, withIcon, withTitleMethods inherited from class io.jmix.flowui.kit.action.AbstractAction
addPropertyChangeListener, firePropertyChange, getDescription, getEventBus, getIcon, getIconComponent, getId, getShortcutCombination, getText, getVariant, hasListener, isEnabled, isVisible, setDescription, setIcon, setIconComponent, setShortcutCombination, setText, setVariant
-
Field Details
-
uiObservationSupport
-
-
Constructor Details
-
ObservableBaseAction
-
-
Method Details
-
actionPerform
public void actionPerform(com.vaadin.flow.component.Component component) Description copied from interface:ActionExecutes action logic.- Specified by:
actionPerformin interfaceAction- Overrides:
actionPerformin classBaseAction- Parameters:
component-Componentthat triggered this action
-
withText
Description copied from class:BaseActionSets the text property value of an action. May be used by components to initialize their appearance.- Overrides:
withTextin classBaseAction- Parameters:
text- text to set ornullto remove- Returns:
- this object
-
withEnabled
Description copied from class:BaseActionSets the enabled property value of an action. May be used by components to initialize their appearance.- Overrides:
withEnabledin classBaseAction- Parameters:
enabled- whether the action is currently enabled- Returns:
- this object
-
withVisible
Description copied from class:BaseActionSets the visible property value of an action. May be used by components to initialize their appearance.- Overrides:
withVisiblein classBaseAction- Parameters:
visible- whether the action is currently visible- Returns:
- this object
-
withIcon
Description copied from class:BaseActionSets the icon property value of an action. May be used by components to initialize their appearance.- Overrides:
withIconin classBaseAction- Parameters:
icon- icon to set ornullto remove- Returns:
- this object
-
withIcon
@Deprecated(since="3.0", forRemoval=true) public A withIcon(@Nullable com.vaadin.flow.component.icon.Icon icon) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:BaseActionSets the icon property value of an action. May be used by components to initialize their appearance.- Overrides:
withIconin classBaseAction- Parameters:
icon- icon to set ornullto remove- Returns:
- this object
-
withDescription
Description copied from class:BaseActionSets the description property value of an action. May be used by components to initialize their appearance.- Overrides:
withDescriptionin classBaseAction- Parameters:
description- description to set ornullto remove- Returns:
- this object
-
withVariant
Description copied from class:BaseActionSets the variant property value of an action. May be used by components to initialize their appearance.- Overrides:
withVariantin classBaseAction- Parameters:
variant- variant to set- Returns:
- this object
-
withShortcutCombination
Description copied from class:BaseActionSets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.- Overrides:
withShortcutCombinationin classBaseAction- Parameters:
shortcutCombination- key combination to set ornullto remove- Returns:
- this object
-
withHandler
Description copied from class:BaseActionAdds a listener to be notified when action is performed.- Overrides:
withHandlerin classBaseAction- Parameters:
handler- listener to add ornullto remove all- Returns:
- this object
-
getUiObservationSupport
-