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 
Actions.- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected booleanprotected EventBusprotected com.vaadin.flow.component.icon.Iconprotected final Stringprotected KeyCombinationprotected Stringprotected ActionVariantprotected booleanFields 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.RegistrationaddPropertyChangeListener(Consumer<PropertyChangeEvent> listener) Adds a listener to be notified about changes in the properties of the action.protected voidfirePropertyChange(String propertyName, Object oldValue, Object newValue) Returns the description property value of an action.protected EventBuscom.vaadin.flow.component.icon.IcongetIcon()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 booleanhasListener(Class<? extends EventObject> eventType) booleanReturns the enabled property value of an action.booleanReturns the visible property value of an action.voidsetDescription(String description) Sets the description property value of an action.voidsetEnabled(boolean enabled) Sets the enabled property value of an action.voidsetIcon(com.vaadin.flow.component.icon.Icon icon) Sets the icon property value of an action.voidsetShortcutCombination(KeyCombination shortcutCombination) Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.voidSets the text property value of an action.voidsetVariant(ActionVariant variant) Sets the variant property value of an action.voidsetVisible(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, waitMethods 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:ActionReturns the text property value of an action. May be used by components to initialize their appearance. - 
setText
Description copied from interface:ActionSets the text property value of an action. May be used by components to initialize their appearance. - 
isEnabled
public boolean isEnabled()Description copied from interface:ActionReturns 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:ActionSets the enabled property value of an action. May be used by components to initialize their appearance.- Specified by:
 setEnabledin interfaceAction- Parameters:
 enabled- whether the action is currently enabled
 - 
isVisible
public boolean isVisible()Description copied from interface:ActionReturns 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:ActionSets the visible property value of an action. May be used by components to initialize their appearance.- Specified by:
 setVisiblein interfaceAction- Parameters:
 visible- whether the action is currently visible
 - 
getIcon
@Nullable public com.vaadin.flow.component.icon.Icon getIcon()Description copied from interface:ActionReturns 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:ActionSets the icon property value of an action. May be used by components to initialize their appearance. - 
getDescription
Description copied from interface:ActionReturns the description property value of an action. May be used by components to initialize their appearance.- Specified by:
 getDescriptionin interfaceAction- Returns:
 - action's description or 
nullif not set 
 - 
setDescription
Description copied from interface:ActionSets the description property value of an action. May be used by components to initialize their appearance.- Specified by:
 setDescriptionin interfaceAction- Parameters:
 description- description to set ornullto remove
 - 
getVariant
Description copied from interface:ActionReturns the variant property value of an action. May be used by components to initialize their appearance.- Specified by:
 getVariantin interfaceAction- Returns:
 - action's variant
 
 - 
setVariant
Description copied from interface:ActionSets the variant property value of an action. May be used by components to initialize their appearance.- Specified by:
 setVariantin interfaceAction- Parameters:
 variant- variant to set
 - 
getShortcutCombination
- Specified by:
 getShortcutCombinationin interfaceHasShortcutCombination- Returns:
 - object that stores information about keys, modifiers and additional
 settings that describe shortcut combinations or 
nullif not set 
 - 
setShortcutCombination
Description copied from interface:HasShortcutCombinationSets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.- Specified by:
 setShortcutCombinationin interfaceHasShortcutCombination- Parameters:
 shortcutCombination- key combination to set ornullto remove
 - 
addPropertyChangeListener
public com.vaadin.flow.shared.Registration addPropertyChangeListener(Consumer<PropertyChangeEvent> listener) Description copied from interface:ActionAdds a listener to be notified about changes in the properties of the action.- Specified by:
 addPropertyChangeListenerin interfaceAction- Parameters:
 listener- listener to add- Returns:
 - a registration object for removing an event listener
 
 - 
getEventBus
 - 
hasListener
 - 
firePropertyChange
 
 -