Package io.jmix.flowui.kit.action
Class AbstractAction
java.lang.Object
io.jmix.flowui.kit.action.AbstractAction
- All Implemented Interfaces:
Action
,HasShortcutCombination
- Direct Known Subclasses:
BaseAction
Abstract class for
Action
s.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected boolean
protected EventBus
protected com.vaadin.flow.component.icon.Icon
protected final String
protected KeyCombination
protected String
protected ActionVariant
protected boolean
Fields 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 TypeMethodDescriptioncom.vaadin.flow.shared.Registration
addPropertyChangeListener
(Consumer<PropertyChangeEvent> listener) Adds a listener to be notified about changes in the properties of the action.protected void
firePropertyChange
(String propertyName, Object oldValue, Object newValue) Returns the description property value of an action.protected EventBus
com.vaadin.flow.component.icon.Icon
getIcon()
Returns the icon property value of an action.getId()
getText()
Returns the text property value of an action.Returns the variant property value of an action.protected boolean
hasListener
(Class<? extends EventObject> eventType) boolean
Returns the enabled property value of an action.boolean
Returns the visible property value of an action.void
setDescription
(String description) Sets the description property value of an action.void
setEnabled
(boolean enabled) Sets the enabled property value of an action.void
setIcon
(com.vaadin.flow.component.icon.Icon icon) Sets the icon property value of an action.void
setShortcutCombination
(KeyCombination shortcutCombination) Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.void
Sets the text property value of an action.void
setVariant
(ActionVariant variant) Sets the variant property value of an action.void
setVisible
(boolean visible) Sets the visible property value of an action.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.flowui.kit.action.Action
actionPerform, refreshState
-
Field Details
-
id
-
text
-
enabled
protected boolean enabled -
visible
protected boolean visible -
icon
protected com.vaadin.flow.component.icon.Icon icon -
description
-
variant
-
shortcutCombination
-
eventBus
-
-
Constructor Details
-
AbstractAction
-
-
Method Details
-
getId
-
getText
Description copied from interface:Action
Returns the text property value of an action. May be used by components to initialize their appearance. -
setText
Description copied from interface:Action
Sets the text property value of an action. May be used by components to initialize their appearance. -
isEnabled
public boolean isEnabled()Description copied from interface:Action
Returns the enabled property value of an action. May be used by components to initialize their appearance. -
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:Action
Sets the enabled property value of an action. May be used by components to initialize their appearance.- Specified by:
setEnabled
in interfaceAction
- Parameters:
enabled
- whether the action is currently enabled
-
isVisible
public boolean isVisible()Description copied from interface:Action
Returns the visible property value of an action. May be used by components to initialize their appearance. -
setVisible
public void setVisible(boolean visible) Description copied from interface:Action
Sets the visible property value of an action. May be used by components to initialize their appearance.- Specified by:
setVisible
in interfaceAction
- Parameters:
visible
- whether the action is currently visible
-
getIcon
@Nullable public com.vaadin.flow.component.icon.Icon getIcon()Description copied from interface:Action
Returns the icon property value of an action. May be used by components to initialize their appearance. -
setIcon
public void setIcon(@Nullable com.vaadin.flow.component.icon.Icon icon) Description copied from interface:Action
Sets the icon property value of an action. May be used by components to initialize their appearance. -
getDescription
Description copied from interface:Action
Returns the description property value of an action. May be used by components to initialize their appearance.- Specified by:
getDescription
in interfaceAction
- Returns:
- action's description or
null
if not set
-
setDescription
Description copied from interface:Action
Sets the description property value of an action. May be used by components to initialize their appearance.- Specified by:
setDescription
in interfaceAction
- Parameters:
description
- description to set ornull
to remove
-
getVariant
Description copied from interface:Action
Returns the variant property value of an action. May be used by components to initialize their appearance.- Specified by:
getVariant
in interfaceAction
- Returns:
- action's variant
-
setVariant
Description copied from interface:Action
Sets the variant property value of an action. May be used by components to initialize their appearance.- Specified by:
setVariant
in interfaceAction
- Parameters:
variant
- variant to set
-
getShortcutCombination
- Specified by:
getShortcutCombination
in interfaceHasShortcutCombination
- Returns:
- object that stores information about keys, modifiers and additional
settings that describe shortcut combinations or
null
if not set
-
setShortcutCombination
Description copied from interface:HasShortcutCombination
Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.- Specified by:
setShortcutCombination
in interfaceHasShortcutCombination
- Parameters:
shortcutCombination
- key combination to set ornull
to remove
-
addPropertyChangeListener
public com.vaadin.flow.shared.Registration addPropertyChangeListener(Consumer<PropertyChangeEvent> listener) Description copied from interface:Action
Adds a listener to be notified about changes in the properties of the action.- Specified by:
addPropertyChangeListener
in interfaceAction
- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener
-
getEventBus
-
hasListener
-
firePropertyChange
-