public final class ButtonType extends 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| Constructor and Description |
|---|
ButtonType(String text)
Creates a ButtonType instance with the given text, and the ButtonData set
as
ButtonBar.ButtonData.OTHER. |
ButtonType(String text,
ButtonBar.ButtonData buttonData)
Creates a ButtonType instance with the given text, and the ButtonData set
as specified.
|
| Modifier and Type | Method and Description |
|---|---|
ButtonBar.ButtonData |
getButtonData()
Returns the ButtonData specified for this ButtonType in the constructor.
|
String |
getText()
Returns the text specified for this ButtonType in the constructor;
|
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.public ButtonType(String text)
ButtonBar.ButtonData.OTHER.text - The string to display in the text property of controls such
as Button.public ButtonType(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.public final ButtonBar.ButtonData getButtonData()
public final String getText()
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.