The dialog pane should be added to the application in such a way that it covers the entire area of the window. If the application is using a StackPane as its root container then the dialog pane can simply be added as the last child of the StackPane.
dialogPane.showInformation("My Title", "My message");
If an application wants to act upon the button that was pressed after showing a confirmation dialog then the following can be written:
dialogPane.showConfirmation("Confirm", "Really delete?").onClose(buttonType -> { ... });
The pane supports factories for creating the header and the footer. This allows application developers
to completely replace those elements of the dialogs. Default factories are already registered and will
be used if not replaced.
setHeaderFactory(Callback), </p>
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private class | |
| public static class | DialogPane.
The default resize handler is used to persist the dialog's width and height after the user performed a resize operation on the dialog. |
| public static class | DialogPane.
the type of value that the dialog can return T>Represents a dialog that can be displayed to the user. |
| public static class | DialogPane.
The default footer / button bar implementation for dialogs managed by the |
| public static class | DialogPane.
The default header implementation for dialogs managed by the |
| public static enum | DialogPane.
The various dialog types supported by |
| Modifier and Type | Field and Description |
|---|---|
| private final BooleanProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final ObservableList | |
| private final ListProperty | |
| private final Map | |
| private final EventHandler | |
| private final BooleanProperty | |
| private final ObjectProperty | |
| private final GlassPane | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final DoubleProperty | |
| private static final String | |
| private final StringProperty | |
| private final ReadOnlyBooleanWrapper | |
| private final WeakEventHandler |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final BooleanProperty | Returns: true if the dialog will be animated when appearing / disappearingDetermines if the dialogs will be animated when they appear. |
| public final ObjectProperty | Returns: the animation durationStores the duration used to animate the fly-in / fly-out of the dialogs. |
| public final ObjectProperty | Returns: a string converterA string converter can be applied to easily manipulate the default text representation of the various button types. |
| public final ListProperty | |
| private DialogPane. | |
| private DialogPane. | |
| private void | |
| public final BooleanProperty | Returns: true if fade-in / fade-out will be used for showing / hiding dialogsControls whether the glass pane and the dialogs will animate their opacity during showing or hiding dialogs. |
| public final ObjectProperty | Returns: the header factoryA callback used as a factory for creating the footer for each dialog. |
| public final Duration | |
| public final StringConverter | |
| public final ObservableList | Returns: the list of dialogs currently showingThe list of currently active / showing dialogs. |
| public final Callback | |
| public final GlassPane | Returns: the glass pane objectRetrieves the glass pane associated with this dialog pane. |
| public final Callback | |
| public final Supplier | |
| public final double | |
| public final String | |
| public String | getUserAgentStylesheet()
Overrides javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. |
| public final ObjectProperty | Returns: the header factoryA callback used as a factory for creating the header for each dialog. |
| public void | |
| public void | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final ObjectProperty | Returns: the label supplier / callback / factoryA supplier used for creating the label instances that will be used by the standard dialogs. |
| protected void | layoutChildren()
Overrides javafx. Invoked during the layout pass to layout the children in this
|
| public final DoubleProperty | Returns: the padding around a maximized dialogDefines the padding around a maximized dialog in the dialog pane. |
| public final StringProperty | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final DialogPane. | Returns: the created dialogCreates and shows a dialog that shows a busy indicator / busy animation. |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the main message, usually a question message)Creates and shows a confirmation dialog. |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the main message, usually a question message, List<ButtonType> the buttons to show in the footer buttonTypes)Creates and shows a confirmation dialog. |
| public void | showDialog(DialogPane.
the dialog to show dialogMakes the given dialog visible in the pane. |
| public final DialogPane. | |
| public final DialogPane. | |
| public final DialogPane. | |
| public final DialogPane. | |
| public final DialogPane. | |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the main message, usually a question message)Creates and shows an information dialog. |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the main message, usually a question message, List<ButtonType> the list of buttons to create in the footer / button bar buttons)Creates and shows an information dialog. |
| public final ReadOnlyBooleanProperty | Returns: true if at least one dialog is currently showingA read-only property used to signal that the pane is currently showing a dialog or not. |
| public final < the type of the value provided by the dialog T> DialogPane. | Returns: the dialogthe type of dialog (info, warning, error, ....) type,the text shown in the title section / header of the dialog title, Node the node to show node)Shows an arbitrary node in a dialog. |
| public final < the type of the value provided by the dialog T> DialogPane. | Returns: the dialogthe type of dialog (info, warning, error, ....) type,the text shown in the title section / header of the dialog title, Node the node to show node, boolean if true the dialog will use the maximum size available maximize)Shows an arbitrary node in a dialog. |
| public final < the type of the value provided by the dialog T> DialogPane. | Returns: the dialogthe type of dialog (info, warning, error, ....) type,the text shown in the title section / header of the dialog title, Node the node to show node, List<ButtonType> a list of buttons to create inside the footer / button bar buttons)Shows an arbitrary node in a dialog. |
| public final < the type of the value provided by the dialog T> DialogPane. | Returns: the dialogthe type of dialog (info, warning, error, ....) type,the text shown in the title section / header of the dialog title, Node the node to show node, boolean if true the dialog will use the maximum size available maximize, List<ButtonType> a list of buttons to create inside the footer / button bar buttons)Shows an arbitrary node in a dialog. |
| public final < the type of the value provided by the dialog T> DialogPane. | Returns: the dialogthe type of dialog (info, warning, error, ....) type,the text shown in the title section / header of the dialog title, Node the node to show node, boolean if true the dialog will use the maximum size available maximize, List<ButtonType> a list of buttons to create inside the footer / button bar buttons, boolean if true all buttons in the footer / button bar will have the same width sameWidthButtons)Shows an arbitrary node in a dialog. |
| public final < the type of the value provided by the dialog T> DialogPane. | Returns: the dialogthe type of dialog (info, warning, error, ....) type,the text shown in the title section / header of the dialog title, Node the node to show node, boolean if true the dialog will use the maximum size available maximize, List<ButtonType> a list of buttons to create inside the footer / button bar buttons, boolean if true all buttons in the footer / button bar will have the same width sameWidthButtons, BooleanProperty a validity property that will be bound to the validity property of the dialog validProperty)Shows an arbitrary node in a dialog. |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the initial text to show text)Creates and shows a text input dialog. |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the initial text to show text, boolean if true the dialog will show a text area, otherwise a text field multiline)Creates and shows a text input dialog. |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the main message, usually a question message, String the initial text to show text, boolean if true the dialog will show a text area, otherwise a text field multiline)Creates and shows a text input dialog. |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the main message, usually a question message, String the prompt text for the text input control prompt, String the initial text to show text, boolean if true the dialog will show a text area, otherwise a text field multiline)Creates and shows a text input dialog. |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the main message, usually a question message, String the prompt text for the text input control prompt, String the initial text to show text, boolean if true the dialog will show a text area, otherwise a text field multiline, List<ButtonType> buttonTypes)Creates and shows a text input dialog. |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the warning message message)Creates and shows a warning dialog. |
| public final DialogPane. | Returns: the dialogthe text shown in the header of the dialog title, String the warning message message, List<ButtonType> buttonTypes)Creates and shows a warning dialog. |
| private void |