public final class ButtonType
extends java.lang.Object
Dialog
API (more
specifically, the DialogPane
API) to specify which buttons should be
shown to users in the dialogs. Refer to the DialogPane
class javadoc
for more information on how to use this class.Alert
,
Dialog
,
DialogPane
Modifier | Constructor and Description |
---|---|
|
ButtonType(java.lang.String text)
Creates a ButtonType instance with the given text, and the ButtonData set
as
ButtonBar.ButtonData.OTHER . |
|
ButtonType(java.lang.String text,
ButtonBar.ButtonData buttonData)
Creates a ButtonType instance with the given text, and the ButtonData set
as specified.
|
private |
ButtonType(java.lang.String key,
java.lang.String text,
ButtonBar.ButtonData buttonData)
Provide key or text.
|
Modifier and Type | Method and Description |
---|---|
ButtonBar.ButtonData |
getButtonData()
Returns the ButtonData specified for this ButtonType in the constructor.
|
java.lang.String |
getText()
Returns the text specified for this ButtonType in the constructor.
|
java.lang.String |
toString() |
public static final ButtonType APPLY
ButtonType
that displays "Apply" and has a
ButtonBar.ButtonData
of ButtonBar.ButtonData.APPLY
.public static final ButtonType OK
ButtonType
that displays "OK" and has a
ButtonBar.ButtonData
of ButtonBar.ButtonData.OK_DONE
.public static final ButtonType CANCEL
ButtonType
that displays "Cancel" and has a
ButtonBar.ButtonData
of ButtonBar.ButtonData.CANCEL_CLOSE
.public static final ButtonType CLOSE
ButtonType
that displays "Close" and has a
ButtonBar.ButtonData
of ButtonBar.ButtonData.CANCEL_CLOSE
.public static final ButtonType YES
ButtonType
that displays "Yes" and has a
ButtonBar.ButtonData
of ButtonBar.ButtonData.YES
.public static final ButtonType NO
ButtonType
that displays "No" and has a
ButtonBar.ButtonData
of ButtonBar.ButtonData.NO
.public static final ButtonType FINISH
ButtonType
that displays "Finish" and has a
ButtonBar.ButtonData
of ButtonBar.ButtonData.FINISH
.public static final ButtonType NEXT
ButtonType
that displays "Next" and has a
ButtonBar.ButtonData
of ButtonBar.ButtonData.NEXT_FORWARD
.public static final ButtonType PREVIOUS
ButtonType
that displays "Previous" and has a
ButtonBar.ButtonData
of ButtonBar.ButtonData.BACK_PREVIOUS
.private final java.lang.String key
private final java.lang.String text
private final ButtonBar.ButtonData buttonData
public ButtonType(java.lang.String text)
ButtonBar.ButtonData.OTHER
.text
- The string to display in the text property of controls such
as Button
.public ButtonType(java.lang.String text, ButtonBar.ButtonData buttonData)
text
- The string to display in the text property of controls such
as Button
.buttonData
- The type of button that should be created from this ButtonType.private ButtonType(java.lang.String key, java.lang.String text, ButtonBar.ButtonData buttonData)
public final ButtonBar.ButtonData getButtonData()
public final java.lang.String getText()
public java.lang.String toString()
toString
in class java.lang.Object