public static enum Dialog.Actions extends Enum<Dialog.Actions> implements Dialog.DialogAction
Dialog class
documentation for examples on how to use this enumeration.| 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.
|
| Enum Constant and Description |
|---|
CANCEL
An action that, by default, will show 'Cancel'.
|
CLOSE
An action that, by default, will show 'Close'.
|
NO
An action that, by default, will show 'No'.
|
OK
An action that, by default, will show 'OK'.
|
YES
An action that, by default, will show 'Yes'.
|
| 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.
|
boolean |
hasTrait(Dialog.ActionTrait trait)
Returns true if
Action has given trait |
StringProperty |
longTextProperty()
The longer form of the text to show to the user (e.g.
|
StringProperty |
textProperty()
The text to show to the user.
|
static Dialog.Actions |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Dialog.Actions[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Dialog.Actions CANCEL
public static final Dialog.Actions CLOSE
public static final Dialog.Actions NO
public static final Dialog.Actions OK
public static final Dialog.Actions YES
public StringProperty textProperty
textProperty in interface ActionStringProperty that represents the current
text for this property, and which can be observed for changes.public BooleanProperty disabledProperty
disabledProperty in interface ActionBooleanProperty that represents the current
disabled state for this property, and which can be observed for
changes.public StringProperty longTextProperty
Button, it is usually a tooltip that should be shown to the user
if their mouse hovers over this action).longTextProperty in interface ActionStringProperty that represents the current
long text for this property, and which can be observed for changes.public ObjectProperty<Node> graphicProperty
graphicProperty in interface ActionObjectProperty that represents the current
graphic for this property, and which can be observed for changes.public ObjectProperty<KeyCombination> acceleratorProperty
KeyCombination that should be used for this action,
if it is used in an applicable UI control (most notably MenuItem.acceleratorProperty in interface ActionObjectProperty that represents the current
accelerator for this property, and which can be observed for changes.public static Dialog.Actions[] values()
for (Dialog.Actions c : Dialog.Actions.values()) System.out.println(c);
public static Dialog.Actions valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic StringProperty textProperty()
textProperty in interface ActionStringProperty that represents the current
text for this property, and which can be observed for changes.public BooleanProperty disabledProperty()
disabledProperty in interface ActionBooleanProperty that represents the current
disabled state for this property, and which can be observed for
changes.public StringProperty longTextProperty()
Button, it is usually a tooltip that should be shown to the user
if their mouse hovers over this action).longTextProperty in interface ActionStringProperty that represents the current
long text for this property, and which can be observed for changes.public ObjectProperty<Node> graphicProperty()
graphicProperty in interface ActionObjectProperty that represents the current
graphic for this property, and which can be observed for changes.public ObjectProperty<KeyCombination> acceleratorProperty()
KeyCombination that should be used for this action,
if it is used in an applicable UI control (most notably MenuItem.acceleratorProperty in interface ActionObjectProperty that represents the current
accelerator for this property, and which can be observed for changes.public ObservableMap<Object,Object> getProperties()
getProperties in interface Actionpublic void execute(ActionEvent ae)
public boolean hasTrait(Dialog.ActionTrait trait)
Action has given traithasTrait in interface Dialog.DialogAction