public interface Action
AbstractAction.
Menu and another on a toolbar), consider
using an Action object to implement the function. An Action object provides
centralized handling of the state of action-event-firing components such as
buttons, menu items, etc. The state that an action can handle includes text,
graphic, long text (i.e. tooltip text), and disabled.AbstractAction| Type | Property and Description |
|---|---|
ObjectProperty<KeyCombination> |
accelerator
The accelerator
KeyCombination that should be used for this action,
if it is used in an applicable UI control (most notably MenuItem. |
BooleanProperty |
disabled
This represents whether the action should be available to the end user,
or whether it should appeared 'grayed out'.
|
ObjectProperty<Node> |
graphic
This graphic that should be shown to the user in relation to this action.
|
StringProperty |
longText
The longer form of the text to show to the user (e.g.
|
StringProperty |
text
The text to show to the user.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectProperty<KeyCombination> |
acceleratorProperty()
The accelerator
KeyCombination that should be used for this action,
if it is used in an applicable UI control (most notably MenuItem. |
BooleanProperty |
disabledProperty()
This represents whether the action should be available to the end user,
or whether it should appeared 'grayed out'.
|
void |
execute(ActionEvent ae)
This method is called when the user selects this action.
|
ObservableMap<Object,Object> |
getProperties()
Returns an observable map of properties on this Action for use primarily
by application developers.
|
ObjectProperty<Node> |
graphicProperty()
This graphic that should be shown to the user in relation to this action.
|
StringProperty |
longTextProperty()
The longer form of the text to show to the user (e.g.
|
StringProperty |
textProperty()
The text to show to the user.
|
StringProperty textProperty
BooleanProperty disabledProperty
StringProperty longTextProperty
Button, it is usually a tooltip that should be shown to the user
if their mouse hovers over this action).ObjectProperty<Node> graphicProperty
ObjectProperty<KeyCombination> acceleratorProperty
KeyCombination that should be used for this action,
if it is used in an applicable UI control (most notably MenuItem.StringProperty textProperty()
BooleanProperty disabledProperty()
StringProperty longTextProperty()
Button, it is usually a tooltip that should be shown to the user
if their mouse hovers over this action).ObjectProperty<Node> graphicProperty()
ObjectProperty<KeyCombination> acceleratorProperty()
KeyCombination that should be used for this action,
if it is used in an applicable UI control (most notably MenuItem.ObservableMap<Object,Object> getProperties()
void execute(ActionEvent ae)
ae - The action context.