java.lang.Object
javafx.scene.control.ButtonType
public final class ButtonType extends Object
The ButtonType class is used as part of the JavaFX 
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.- Since:
- JavaFX 8u40
- See Also:
- Alert,- Dialog,- DialogPane
- 
Field Summary
- 
Constructor SummaryConstructors Constructor Description ButtonType(String text)Creates a ButtonType instance with the given text, and the ButtonData set asButtonBar.ButtonData.OTHER.ButtonType(String text, ButtonBar.ButtonData buttonData)Creates a ButtonType instance with the given text, and the ButtonData set as specified.
- 
Method SummaryModifier and Type Method Description ButtonBar.ButtonDatagetButtonData()Returns the ButtonData specified for this ButtonType in the constructor.StringgetText()Returns the text specified for this ButtonType in the constructor.
- 
Field Details- 
APPLYA pre-definedButtonTypethat displays "Apply" and has aButtonBar.ButtonDataofButtonBar.ButtonData.APPLY.
- 
OKA pre-definedButtonTypethat displays "OK" and has aButtonBar.ButtonDataofButtonBar.ButtonData.OK_DONE.
- 
CANCELA pre-definedButtonTypethat displays "Cancel" and has aButtonBar.ButtonDataofButtonBar.ButtonData.CANCEL_CLOSE.
- 
CLOSEA pre-definedButtonTypethat displays "Close" and has aButtonBar.ButtonDataofButtonBar.ButtonData.CANCEL_CLOSE.
- 
YESA pre-definedButtonTypethat displays "Yes" and has aButtonBar.ButtonDataofButtonBar.ButtonData.YES.
- 
NOA pre-definedButtonTypethat displays "No" and has aButtonBar.ButtonDataofButtonBar.ButtonData.NO.
- 
FINISHA pre-definedButtonTypethat displays "Finish" and has aButtonBar.ButtonDataofButtonBar.ButtonData.FINISH.
- 
NEXTA pre-definedButtonTypethat displays "Next" and has aButtonBar.ButtonDataofButtonBar.ButtonData.NEXT_FORWARD.
- 
PREVIOUSA pre-definedButtonTypethat displays "Previous" and has aButtonBar.ButtonDataofButtonBar.ButtonData.BACK_PREVIOUS.
 
- 
- 
Constructor Details- 
ButtonTypeCreates a ButtonType instance with the given text, and the ButtonData set asButtonBar.ButtonData.OTHER.- Parameters:
- text- The string to display in the text property of controls such as- Button.
 
- 
ButtonTypeCreates a ButtonType instance with the given text, and the ButtonData set as specified.- Parameters:
- 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.
 
 
- 
- 
Method Details- 
getButtonDataReturns the ButtonData specified for this ButtonType in the constructor.- Returns:
- the ButtonData specified for this ButtonType in the constructor
 
- 
getTextReturns the text specified for this ButtonType in the constructor.- Returns:
- the text specified for this ButtonType in the constructor
 
 
-