@StudioAction(target="io.jmix.ui.component.ValuePicker", description="Clears the value picker value") @ActionType(value="value_clear") public class ValueClearAction extends BaseAction implements ValuePicker.ValuePickerAction, org.springframework.beans.factory.InitializingBean, Action.ExecutableAction
Should be defined for ValuePicker
or its subclass in a screen XML descriptor.
BaseAction.EnabledRule
Action.ActionPerformedEvent, Action.AdjustWhenScreenReadOnly, Action.ExecutableAction, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.MainTabSheetAction, Action.ScreenOpeningAction, Action.SecuredAction, Action.Status
Modifier and Type | Field and Description |
---|---|
protected UiComponentProperties |
componentProperties |
protected boolean |
editable |
protected Icons |
icons |
static java.lang.String |
ID |
protected io.jmix.core.Messages |
messages |
protected ValuePicker |
valuePicker |
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visible
PROP_EDITABLE
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE
Constructor and Description |
---|
ValueClearAction() |
ValueClearAction(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerform(Component component)
Invoked by owning component to execute the action.
|
void |
afterPropertiesSet() |
void |
editableChanged(boolean editable)
Called by
ValuePicker to inform about its editable state. |
void |
execute()
Executes the action.
|
boolean |
isEditable() |
protected void |
setEditable(boolean editable) |
protected void |
setIcons(Icons icons) |
protected void |
setMessages(io.jmix.core.Messages messages) |
void |
setPicker(ValuePicker valuePicker)
Sets a
ValuePicker instance associated with this action. |
protected void |
setUiComponentProperties(UiComponentProperties componentProperties) |
addActionPerformedListener, addEnabledRule, isApplicable, isEnabledByRule, isEnabledByUiPermissions, isPermitted, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternal, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcut
addOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setPrimary, setShortcut, setShortcutCombination
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setShortcut, setShortcutCombination, setVisible
public static final java.lang.String ID
protected ValuePicker valuePicker
protected Icons icons
protected io.jmix.core.Messages messages
protected UiComponentProperties componentProperties
protected boolean editable
public ValueClearAction()
public ValueClearAction(java.lang.String id)
@Autowired protected void setUiComponentProperties(UiComponentProperties componentProperties)
@Autowired protected void setMessages(io.jmix.core.Messages messages)
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public void setPicker(@Nullable ValuePicker valuePicker)
ValuePicker.ValuePickerAction
ValuePicker
instance associated with this action.setPicker
in interface ValuePicker.ValuePickerAction
valuePicker
- a ValuePicker
instance to setpublic void editableChanged(boolean editable)
ValuePicker.ValuePickerAction
ValuePicker
to inform about its editable state.editableChanged
in interface ValuePicker.ValuePickerAction
editable
- a ValuePicker
editable statepublic boolean isEditable()
isEditable
in interface ValuePicker.ValuePickerAction
protected void setEditable(boolean editable)
@Autowired protected void setIcons(Icons icons)
public void actionPerform(Component component)
Action
actionPerform
in interface Action
actionPerform
in class BaseAction
component
- invoking componentpublic void execute()
execute
in interface Action.ExecutableAction