• masthead – An area that is optional and immediately below the title
• graphic – A graphic image contained within the masthead
• content – The primary content of the dialog
• button bar – A set of buttons to close the dialog
A set of pre-engineered dialogs have been build:
• Information - showInformation()
• Confirmation - showConfirm()
• Warning - showWarning()
• Error - showError()
• Exception - showException()
• Text Input - showTextInput()
• Choice Input - showChoices()
• Command Link - showCommandLinks()
• Font Selector - showFontSelector()
• Progress - showWorkerProgress()
See also:
• ControlsFX Web Site
org.controlsfx.dialog.Dialog
This class provides the base of a Dialog. It is the most general purpose and what is commonly used
to show user built dialogs.
The buttons in the dialog are not set by default. You can add your own buttons by adding to the list
of Actions obtained through Dialog's getActions(). A set of predefined Actions are available
as:
• Dialog.Actions.CANCEL – Shows a cancel button
• Dialog.Actions.CLOSE – Shows a close button
• Dialog.Actions.NO – Shows a no button
• Dialog.Actions.OK – Shows an ok button
• Dialog.Actions.YES – Shows a yes button
When the Dialog's show() method is called it shows the dialog and blocks waiting for the dialog
to be disposed. The return from show() is an Action instance that describes the reason that the
dialog was completed. We can compare this Action against the possible actions to figure out which
ones were returned.
A suggested recipe for building an instance of the dialog is:
1. Create an FXML file that will be used as the content of the dialog. Make sure that it does
not use the "fx:root" construct.
Page 287
Comentarios a estos manuales