Class DialogPane.Dialog<T>
java.lang.Object
com.dlsc.gemsfx.DialogPane.Dialog<T>
- Type Parameters:
T- the type of value that the dialog can return
- Enclosing class:
DialogPane
Represents a dialog that can be displayed to the user.
-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ObjectProperty<javafx.geometry.Pos> Determines how the content node is positioned within the content pane of the dialog.final javafx.beans.property.ObjectProperty<javafx.scene.Node> Stores the content shown in the center of the dialog.final javafx.beans.property.ObjectProperty<javafx.util.Duration> A property that can be used to delay the appearance of the dialog inside the dialog pane.final javafx.beans.property.ObjectProperty<javafx.scene.Node> An extra node that might be displayed in the header or the footer of the dialog.final javafx.beans.property.StringPropertyStores an optional ID for the dialog, which can be handy for various situations.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.BooleanPropertyIf maximized the dialog will try to use as much width and height inside the dialog pane as possible.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.DoublePropertyfinal javafx.beans.property.DoublePropertyfinal javafx.beans.property.ObjectProperty<Consumer<javafx.scene.control.ButtonType>> final javafx.beans.property.ObjectProperty<BiConsumer<Double, Double>> A callback used to inform interested parties when the user changed the width or height of the dialog.final javafx.beans.property.ObjectProperty<Preferences> Stores a reference to a preferences object which can be used to persist the width and height of the dialog across user sessions.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.DoublePropertyfinal javafx.beans.property.BooleanPropertyA flag used to signal to the framework that input is required in this dialog.final javafx.beans.property.BooleanPropertyDetermines if the user will be able to interactively resize the dialog.final javafx.beans.property.BooleanPropertyDetermines if the buttons in the button bar will all have the same width or each one will have its preferred width.final javafx.beans.property.BooleanPropertyDetermines if the dialog will make a "close" button available to the user.final javafx.beans.property.BooleanPropertyDetermines if the dialog will show the button bar / footer at the bottom or not.final javafx.beans.property.BooleanPropertyDetermines if the dialog will show the title / header at the bottom or not.final javafx.beans.property.StringPropertyfinal javafx.beans.property.BooleanPropertyControls whether additional padding will be applied "around" the content node.final javafx.beans.property.ObjectProperty<net.synedra.validatorfx.Validator> A validator that can be used in the context of this dialog.final javafx.beans.property.BooleanPropertyDetermines whether the values entered in the dialog are currently valid and will be accepted by the application.final javafx.beans.property.ObjectProperty<T> Stores the value entered or selected by the user in the dialog. -
Constructor Summary
ConstructorsConstructorDescriptionDialog(DialogPane pane, DialogPane.Type type) Creates a new dialog with the specified dialog pane and type. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Hides the dialog by cancelling it.final javafx.beans.property.ObjectProperty<javafx.geometry.Pos> Determines how the content node is positioned within the content pane of the dialog.final javafx.beans.property.ObjectProperty<javafx.scene.Node> Stores the content shown in the center of the dialog.final javafx.beans.property.ObjectProperty<javafx.util.Duration> A property that can be used to delay the appearance of the dialog inside the dialog pane.final javafx.beans.property.ObjectProperty<javafx.scene.Node> An extra node that might be displayed in the header or the footer of the dialog.final javafx.scene.control.ButtongetButton(javafx.scene.control.ButtonType type) Returns the button created for the given button type, but only if such a button type was requested for the dialog.final javafx.collections.ObservableList<javafx.scene.control.ButtonType> final javafx.scene.NodeGets the value of thecontentproperty.final javafx.geometry.PosGets the value of thecontentAlignmentproperty.final javafx.util.DurationgetDelay()Gets the value of thedelayproperty.final DialogPaneReturns the dialog pane where the dialog is showing.final javafx.scene.NodeGets the value of theextrasproperty.final StringgetId()Gets the value of theidproperty.final doubleGets the value of themaxHeightproperty.final doubleGets the value of themaxWidthproperty.final doubleGets the value of theminHeightproperty.final doubleGets the value of theminWidthproperty.Consumer<javafx.scene.control.ButtonType> final Consumer<javafx.scene.control.ButtonType> Gets the value of theonCloseproperty.final BiConsumer<Double, Double> Gets the value of theonResizeproperty.final PreferencesGets the value of thepreferencesproperty.final doubleGets the value of theprefHeightproperty.final doubleGets the value of theprefWidthproperty.final javafx.collections.ObservableList<String> A list with additional styles that will be added to the content pane of the dialog.final StringgetTitle()The title for the dialog.final DialogPane.TypegetType()Returns the type of the dialog, e.g.final net.synedra.validatorfx.ValidatorGets the value of thevalidatorproperty.final TgetValue()Gets the value of thevalueproperty.final javafx.beans.property.StringPropertyStores an optional ID for the dialog, which can be handy for various situations.final booleanGets the value of themaximizeproperty.final booleanGets the value of therequiredproperty.final booleanGets the value of theresizableproperty.final booleanGets the value of thesameWidthButtonsproperty.final booleanGets the value of theshowCloseButtonproperty.final booleanGets the value of theshowFooterproperty.final booleanGets the value of theshowHeaderproperty.final booleanGets the value of theusingPaddingproperty.final booleanisValid()Gets the value of thevalidproperty.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.BooleanPropertyIf maximized the dialog will try to use as much width and height inside the dialog pane as possible.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.DoublePropertyfinal javafx.beans.property.DoublePropertyfinal DialogPane.Dialog<T> Sets a consumer that will be invoked when the dialog is being closed.final javafx.beans.property.ObjectProperty<Consumer<javafx.scene.control.ButtonType>> final javafx.beans.property.ObjectProperty<BiConsumer<Double, Double>> A callback used to inform interested parties when the user changed the width or height of the dialog.final javafx.beans.property.ObjectProperty<Preferences> Stores a reference to a preferences object which can be used to persist the width and height of the dialog across user sessions.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.DoublePropertyvoidpress(javafx.scene.control.ButtonType buttonType) Programmatic access to closing the dialog with the given button type.final javafx.beans.property.BooleanPropertyA flag used to signal to the framework that input is required in this dialog.final javafx.beans.property.BooleanPropertyDetermines if the user will be able to interactively resize the dialog.final javafx.beans.property.BooleanPropertyDetermines if the buttons in the button bar will all have the same width or each one will have its preferred width.final voidsetContent(javafx.scene.Node content) Sets the value of thecontentproperty.final voidsetContentAlignment(javafx.geometry.Pos contentAlignment) Sets the value of thecontentAlignmentproperty.final voidsetDelay(javafx.util.Duration delay) Sets the value of thedelayproperty.final voidsetExtras(javafx.scene.Node extras) Sets the value of theextrasproperty.final voidSets the value of theidproperty.final voidsetMaxHeight(double maxHeight) Sets the value of themaxHeightproperty.final voidsetMaximize(boolean max) Sets the value of themaximizeproperty.final voidsetMaxWidth(double maxWidth) Sets the value of themaxWidthproperty.final voidsetMinHeight(double minHeight) Sets the value of theminHeightproperty.final voidsetMinWidth(double minWidth) Sets the value of theminWidthproperty.final voidsetOnButtonPressed(Consumer<javafx.scene.control.ButtonType> onButtonPressed) Specifies a consumer that gets invoked when the user presses on of the standard dialog buttons.final voidsetOnClose(Consumer<javafx.scene.control.ButtonType> onClose) Sets the value of theonCloseproperty.final voidsetOnResize(BiConsumer<Double, Double> onResize) Sets the value of theonResizeproperty.final voidsetPreferences(Preferences preferences) Sets the value of thepreferencesproperty.final voidsetPrefHeight(double prefHeight) Sets the value of theprefHeightproperty.final voidsetPrefWidth(double prefWidth) Sets the value of theprefWidthproperty.final voidsetRequired(boolean required) Sets the value of therequiredproperty.final voidsetResizable(boolean resizable) Sets the value of theresizableproperty.final voidsetSameWidthButtons(boolean sameWidthButtons) Sets the value of thesameWidthButtonsproperty.final voidsetShowCloseButton(boolean showCloseButton) Sets the value of theshowCloseButtonproperty.final voidsetShowFooter(boolean showFooter) Sets the value of theshowFooterproperty.final voidsetShowHeader(boolean showHeader) Sets the value of theshowHeaderproperty.final voidSets the value of thetitleproperty.final voidsetUsingPadding(boolean usingPadding) Sets the value of theusingPaddingproperty.final voidsetValid(boolean valid) Sets the value of thevalidproperty.final voidsetValidator(net.synedra.validatorfx.Validator validator) Sets the value of thevalidatorproperty.final voidSets the value of thevalueproperty.voidshow()final javafx.beans.property.BooleanPropertyDetermines if the dialog will make a "close" button available to the user.final javafx.beans.property.BooleanPropertyDetermines if the dialog will show the button bar / footer at the bottom or not.final javafx.beans.property.BooleanPropertyDetermines if the dialog will show the title / header at the bottom or not.final javafx.beans.property.StringPropertyfinal javafx.beans.property.BooleanPropertyControls whether additional padding will be applied "around" the content node.final javafx.beans.property.ObjectProperty<net.synedra.validatorfx.Validator> A validator that can be used in the context of this dialog.final javafx.beans.property.BooleanPropertyDetermines whether the values entered in the dialog are currently valid and will be accepted by the application.final javafx.beans.property.ObjectProperty<T> Stores the value entered or selected by the user in the dialog.
-
Property Details
-
id
public final javafx.beans.property.StringProperty idPropertyStores an optional ID for the dialog, which can be handy for various situations.- See Also:
-
preferences
Stores a reference to a preferences object which can be used to persist the width and height of the dialog across user sessions.- See Also:
-
prefWidth
public final javafx.beans.property.DoubleProperty prefWidthProperty- See Also:
-
prefHeight
public final javafx.beans.property.DoubleProperty prefHeightProperty- See Also:
-
minWidth
public final javafx.beans.property.DoubleProperty minWidthProperty- See Also:
-
minHeight
public final javafx.beans.property.DoubleProperty minHeightProperty- See Also:
-
maxWidth
public final javafx.beans.property.DoubleProperty maxWidthProperty- See Also:
-
maxHeight
public final javafx.beans.property.DoubleProperty maxHeightProperty- See Also:
-
onResize
A callback used to inform interested parties when the user changed the width or height of the dialog.- See Also:
-
required
public final javafx.beans.property.BooleanProperty requiredPropertyA flag used to signal to the framework that input is required in this dialog. This is useful when showing things like text inputs where we automatically want to add a validator.- See Also:
-
showCloseButton
public final javafx.beans.property.BooleanProperty showCloseButtonPropertyDetermines if the dialog will make a "close" button available to the user. Whether this property will be observed or not depends on the actual header implementation. The default implementation of the header does contain a close button.- See Also:
-
delay
public final javafx.beans.property.ObjectProperty<javafx.util.Duration> delayPropertyA property that can be used to delay the appearance of the dialog inside the dialog pane. This is very useful for dialogs that display a busy animation or a progress indicator as usually you only want those to appear if a background operation takes a while.- See Also:
-
usingPadding
public final javafx.beans.property.BooleanProperty usingPaddingPropertyControls whether additional padding will be applied "around" the content node. The actual amount of padding depends on the CSS rules.- See Also:
-
contentAlignment
public final javafx.beans.property.ObjectProperty<javafx.geometry.Pos> contentAlignmentPropertyDetermines how the content node is positioned within the content pane of the dialog. Default is CENTER_LEFT.- See Also:
-
value
Stores the value entered or selected by the user in the dialog. If the dialog is, for example, a text input dialog then the value will be the text entered into the text field of the dialog.- See Also:
-
onClose
public final javafx.beans.property.ObjectProperty<Consumer<javafx.scene.control.ButtonType>> onCloseProperty- See Also:
-
valid
public final javafx.beans.property.BooleanProperty validPropertyDetermines whether the values entered in the dialog are currently valid and will be accepted by the application. The validity is normally determines by the validator object.- See Also:
-
sameWidthButtons
public final javafx.beans.property.BooleanProperty sameWidthButtonsPropertyDetermines if the buttons in the button bar will all have the same width or each one will have its preferred width.- See Also:
-
maximize
public final javafx.beans.property.BooleanProperty maximizePropertyIf maximized the dialog will try to use as much width and height inside the dialog pane as possible.- See Also:
-
content
public final javafx.beans.property.ObjectProperty<javafx.scene.Node> contentPropertyStores the content shown in the center of the dialog.- See Also:
-
extras
public final javafx.beans.property.ObjectProperty<javafx.scene.Node> extrasPropertyAn extra node that might be displayed in the header or the footer of the dialog. This node will only be shown if custom header or footer factories make use of it. By default this node will not be visible anywhere.- See Also:
-
title
public final javafx.beans.property.StringProperty titleProperty- See Also:
-
showHeader
public final javafx.beans.property.BooleanProperty showHeaderPropertyDetermines if the dialog will show the title / header at the bottom or not.- See Also:
-
validator
public final javafx.beans.property.ObjectProperty<net.synedra.validatorfx.Validator> validatorPropertyA validator that can be used in the context of this dialog. Applications can callValidator.createCheck()to add one or more checks which will be validated once the user tries to commit the dialog.- See Also:
-
resizable
public final javafx.beans.property.BooleanProperty resizablePropertyDetermines if the user will be able to interactively resize the dialog. The default is false.- See Also:
-
-
Constructor Details
-
Dialog
Creates a new dialog with the specified dialog pane and type.- Parameters:
pane- the dialog pane where the dialog will be showntype- the type of the dialog (info, warning, error, ...)
-
-
Method Details
-
getType
Returns the type of the dialog, e.g. "info", "error", "warning".- Returns:
- the dialog's type
-
getDialogPane
Returns the dialog pane where the dialog is showing.- Returns:
- the dialog pane to which the dialog belongs
-
getId
Gets the value of theidproperty.- Property description:
- Stores an optional ID for the dialog, which can be handy for various situations.
- Returns:
- the value of the
idproperty - See Also:
-
idProperty
public final javafx.beans.property.StringProperty idProperty()Stores an optional ID for the dialog, which can be handy for various situations.- Returns:
- the id of the dialog, e.g. "preferences.dialog"
- See Also:
-
setId
Sets the value of theidproperty.- Property description:
- Stores an optional ID for the dialog, which can be handy for various situations.
- Parameters:
id- the value for theidproperty- See Also:
-
getPreferences
Gets the value of thepreferencesproperty.- Property description:
- Stores a reference to a preferences object which can be used to persist the width and height of the dialog across user sessions.
- Returns:
- the value of the
preferencesproperty - See Also:
-
preferencesProperty
Stores a reference to a preferences object which can be used to persist the width and height of the dialog across user sessions.- Returns:
- the preferences where we want to store the bounds of the dialog after a resizing operation
- See Also:
-
setPreferences
Sets the value of thepreferencesproperty.- Property description:
- Stores a reference to a preferences object which can be used to persist the width and height of the dialog across user sessions.
- Parameters:
preferences- the value for thepreferencesproperty- See Also:
-
getPrefWidth
public final double getPrefWidth()Gets the value of theprefWidthproperty.- Property description:
- Returns:
- the value of the
prefWidthproperty - See Also:
-
prefWidthProperty
public final javafx.beans.property.DoubleProperty prefWidthProperty()- Returns:
- the
prefWidthproperty - See Also:
-
setPrefWidth
public final void setPrefWidth(double prefWidth) Sets the value of theprefWidthproperty.- Property description:
- Parameters:
prefWidth- the value for theprefWidthproperty- See Also:
-
getPrefHeight
public final double getPrefHeight()Gets the value of theprefHeightproperty.- Property description:
- Returns:
- the value of the
prefHeightproperty - See Also:
-
prefHeightProperty
public final javafx.beans.property.DoubleProperty prefHeightProperty()- Returns:
- the
prefHeightproperty - See Also:
-
setPrefHeight
public final void setPrefHeight(double prefHeight) Sets the value of theprefHeightproperty.- Property description:
- Parameters:
prefHeight- the value for theprefHeightproperty- See Also:
-
getMinWidth
public final double getMinWidth()Gets the value of theminWidthproperty.- Property description:
- Returns:
- the value of the
minWidthproperty - See Also:
-
minWidthProperty
public final javafx.beans.property.DoubleProperty minWidthProperty()- Returns:
- the
minWidthproperty - See Also:
-
setMinWidth
public final void setMinWidth(double minWidth) Sets the value of theminWidthproperty.- Property description:
- Parameters:
minWidth- the value for theminWidthproperty- See Also:
-
getMinHeight
public final double getMinHeight()Gets the value of theminHeightproperty.- Property description:
- Returns:
- the value of the
minHeightproperty - See Also:
-
minHeightProperty
public final javafx.beans.property.DoubleProperty minHeightProperty()- Returns:
- the
minHeightproperty - See Also:
-
setMinHeight
public final void setMinHeight(double minHeight) Sets the value of theminHeightproperty.- Property description:
- Parameters:
minHeight- the value for theminHeightproperty- See Also:
-
getMaxWidth
public final double getMaxWidth()Gets the value of themaxWidthproperty.- Property description:
- Returns:
- the value of the
maxWidthproperty - See Also:
-
maxWidthProperty
public final javafx.beans.property.DoubleProperty maxWidthProperty()- Returns:
- the
maxWidthproperty - See Also:
-
setMaxWidth
public final void setMaxWidth(double maxWidth) Sets the value of themaxWidthproperty.- Property description:
- Parameters:
maxWidth- the value for themaxWidthproperty- See Also:
-
getMaxHeight
public final double getMaxHeight()Gets the value of themaxHeightproperty.- Property description:
- Returns:
- the value of the
maxHeightproperty - See Also:
-
maxHeightProperty
public final javafx.beans.property.DoubleProperty maxHeightProperty()- Returns:
- the
maxHeightproperty - See Also:
-
setMaxHeight
public final void setMaxHeight(double maxHeight) Sets the value of themaxHeightproperty.- Property description:
- Parameters:
maxHeight- the value for themaxHeightproperty- See Also:
-
getOnResize
Gets the value of theonResizeproperty.- Property description:
- A callback used to inform interested parties when the user changed the width or height of the dialog.
- Returns:
- the value of the
onResizeproperty - See Also:
-
onResizeProperty
A callback used to inform interested parties when the user changed the width or height of the dialog.- Returns:
- the callback / the consumer of the new width and height
- See Also:
-
setOnResize
Sets the value of theonResizeproperty.- Property description:
- A callback used to inform interested parties when the user changed the width or height of the dialog.
- Parameters:
onResize- the value for theonResizeproperty- See Also:
-
isRequired
public final boolean isRequired()Gets the value of therequiredproperty.- Property description:
- A flag used to signal to the framework that input is required in this dialog. This is useful when showing things like text inputs where we automatically want to add a validator.
- Returns:
- the value of the
requiredproperty - See Also:
-
requiredProperty
public final javafx.beans.property.BooleanProperty requiredProperty()A flag used to signal to the framework that input is required in this dialog. This is useful when showing things like text inputs where we automatically want to add a validator.- Returns:
- true if the dialog requires input
- See Also:
-
setRequired
public final void setRequired(boolean required) Sets the value of therequiredproperty.- Property description:
- A flag used to signal to the framework that input is required in this dialog. This is useful when showing things like text inputs where we automatically want to add a validator.
- Parameters:
required- the value for therequiredproperty- See Also:
-
isShowCloseButton
public final boolean isShowCloseButton()Gets the value of theshowCloseButtonproperty.- Property description:
- Determines if the dialog will make a "close" button available to the user. Whether this property will be observed or not depends on the actual header implementation. The default implementation of the header does contain a close button.
- Returns:
- the value of the
showCloseButtonproperty - See Also:
-
showCloseButtonProperty
public final javafx.beans.property.BooleanProperty showCloseButtonProperty()Determines if the dialog will make a "close" button available to the user. Whether this property will be observed or not depends on the actual header implementation. The default implementation of the header does contain a close button.- Returns:
- true if the close button will be shown
- See Also:
-
setShowCloseButton
public final void setShowCloseButton(boolean showCloseButton) Sets the value of theshowCloseButtonproperty.- Property description:
- Determines if the dialog will make a "close" button available to the user. Whether this property will be observed or not depends on the actual header implementation. The default implementation of the header does contain a close button.
- Parameters:
showCloseButton- the value for theshowCloseButtonproperty- See Also:
-
getDelay
public final javafx.util.Duration getDelay()Gets the value of thedelayproperty.- Property description:
- A property that can be used to delay the appearance of the dialog inside the dialog pane. This is very useful for dialogs that display a busy animation or a progress indicator as usually you only want those to appear if a background operation takes a while.
- Returns:
- the value of the
delayproperty - See Also:
-
delayProperty
public final javafx.beans.property.ObjectProperty<javafx.util.Duration> delayProperty()A property that can be used to delay the appearance of the dialog inside the dialog pane. This is very useful for dialogs that display a busy animation or a progress indicator as usually you only want those to appear if a background operation takes a while.- Returns:
- the delay before the dialog becomes visible, default is null.
- See Also:
-
setDelay
public final void setDelay(javafx.util.Duration delay) Sets the value of thedelayproperty.- Property description:
- A property that can be used to delay the appearance of the dialog inside the dialog pane. This is very useful for dialogs that display a busy animation or a progress indicator as usually you only want those to appear if a background operation takes a while.
- Parameters:
delay- the value for thedelayproperty- See Also:
-
isUsingPadding
public final boolean isUsingPadding()Gets the value of theusingPaddingproperty.- Property description:
- Controls whether additional padding will be applied "around" the content node. The actual amount of padding depends on the CSS rules.
- Returns:
- the value of the
usingPaddingproperty - See Also:
-
usingPaddingProperty
public final javafx.beans.property.BooleanProperty usingPaddingProperty()Controls whether additional padding will be applied "around" the content node. The actual amount of padding depends on the CSS rules.- Returns:
- true if padding will be added
- See Also:
-
setUsingPadding
public final void setUsingPadding(boolean usingPadding) Sets the value of theusingPaddingproperty.- Property description:
- Controls whether additional padding will be applied "around" the content node. The actual amount of padding depends on the CSS rules.
- Parameters:
usingPadding- the value for theusingPaddingproperty- See Also:
-
getContentAlignment
public final javafx.geometry.Pos getContentAlignment()Gets the value of thecontentAlignmentproperty.- Property description:
- Determines how the content node is positioned within the content pane of the dialog. Default is CENTER_LEFT.
- Returns:
- the value of the
contentAlignmentproperty - See Also:
-
contentAlignmentProperty
public final javafx.beans.property.ObjectProperty<javafx.geometry.Pos> contentAlignmentProperty()Determines how the content node is positioned within the content pane of the dialog. Default is CENTER_LEFT.- Returns:
- the position of the content
- See Also:
-
setContentAlignment
public final void setContentAlignment(javafx.geometry.Pos contentAlignment) Sets the value of thecontentAlignmentproperty.- Property description:
- Determines how the content node is positioned within the content pane of the dialog. Default is CENTER_LEFT.
- Parameters:
contentAlignment- the value for thecontentAlignmentproperty- See Also:
-
getValue
Gets the value of thevalueproperty.- Property description:
- Stores the value entered or selected by the user in the dialog. If the dialog is, for example, a text input dialog then the value will be the text entered into the text field of the dialog.
- Returns:
- the value of the
valueproperty - See Also:
-
valueProperty
Stores the value entered or selected by the user in the dialog. If the dialog is, for example, a text input dialog then the value will be the text entered into the text field of the dialog.- Returns:
- the user entered or selected value
- See Also:
-
setValue
Sets the value of thevalueproperty.- Property description:
- Stores the value entered or selected by the user in the dialog. If the dialog is, for example, a text input dialog then the value will be the text entered into the text field of the dialog.
- Parameters:
value- the value for thevalueproperty- See Also:
-
show
public void show() -
cancel
public void cancel()Hides the dialog by cancelling it. -
getOnButtonPressed
-
setOnButtonPressed
Specifies a consumer that gets invoked when the user presses on of the standard dialog buttons. The invocation happens as part of the complete() method.- Parameters:
onButtonPressed- an optional consumer that gets invoked when the user finishes the dialog
-
getOnClose
Gets the value of theonCloseproperty.- Property description:
- Returns:
- the value of the
onCloseproperty - See Also:
-
onCloseProperty
public final javafx.beans.property.ObjectProperty<Consumer<javafx.scene.control.ButtonType>> onCloseProperty()- Returns:
- the
onCloseproperty - See Also:
-
setOnClose
Sets the value of theonCloseproperty.- Property description:
- Parameters:
onClose- the value for theonCloseproperty- See Also:
-
onClose
Sets a consumer that will be invoked when the dialog is being closed.- Parameters:
onClose- the "close dialog" handler
-
press
public void press(javafx.scene.control.ButtonType buttonType) Programmatic access to closing the dialog with the given button type.- Parameters:
buttonType- the type of button pressed
-
isValid
public final boolean isValid()Gets the value of thevalidproperty.- Property description:
- Determines whether the values entered in the dialog are currently valid and will be accepted by the application. The validity is normally determines by the validator object.
- Returns:
- the value of the
validproperty - See Also:
-
validProperty
public final javafx.beans.property.BooleanProperty validProperty()Determines whether the values entered in the dialog are currently valid and will be accepted by the application. The validity is normally determines by the validator object.- Returns:
- true if the dialog fiels are currently valid
- See Also:
-
setValid
public final void setValid(boolean valid) Sets the value of thevalidproperty.- Property description:
- Determines whether the values entered in the dialog are currently valid and will be accepted by the application. The validity is normally determines by the validator object.
- Parameters:
valid- the value for thevalidproperty- See Also:
-
getButtonTypes
public final javafx.collections.ObservableList<javafx.scene.control.ButtonType> getButtonTypes() -
isSameWidthButtons
public final boolean isSameWidthButtons()Gets the value of thesameWidthButtonsproperty.- Property description:
- Determines if the buttons in the button bar will all have the same width or each one will have its preferred width.
- Returns:
- the value of the
sameWidthButtonsproperty - See Also:
-
sameWidthButtonsProperty
public final javafx.beans.property.BooleanProperty sameWidthButtonsProperty()Determines if the buttons in the button bar will all have the same width or each one will have its preferred width.- Returns:
- true if all buttons should have the same width
- See Also:
-
setSameWidthButtons
public final void setSameWidthButtons(boolean sameWidthButtons) Sets the value of thesameWidthButtonsproperty.- Property description:
- Determines if the buttons in the button bar will all have the same width or each one will have its preferred width.
- Parameters:
sameWidthButtons- the value for thesameWidthButtonsproperty- See Also:
-
maximizeProperty
public final javafx.beans.property.BooleanProperty maximizeProperty()If maximized the dialog will try to use as much width and height inside the dialog pane as possible.- Returns:
- true if the dialog will try to maximize itself
- See Also:
-
setMaximize
public final void setMaximize(boolean max) Sets the value of themaximizeproperty.- Property description:
- If maximized the dialog will try to use as much width and height inside the dialog pane as possible.
- Parameters:
max- the value for themaximizeproperty- See Also:
-
isMaximize
public final boolean isMaximize()Gets the value of themaximizeproperty.- Property description:
- If maximized the dialog will try to use as much width and height inside the dialog pane as possible.
- Returns:
- the value of the
maximizeproperty - See Also:
-
contentProperty
public final javafx.beans.property.ObjectProperty<javafx.scene.Node> contentProperty()Stores the content shown in the center of the dialog.- Returns:
- the content node with the actual UI being displayed to the user
- See Also:
-
setContent
public final void setContent(javafx.scene.Node content) Sets the value of thecontentproperty.- Property description:
- Stores the content shown in the center of the dialog.
- Parameters:
content- the value for thecontentproperty- See Also:
-
getContent
public final javafx.scene.Node getContent()Gets the value of thecontentproperty.- Property description:
- Stores the content shown in the center of the dialog.
- Returns:
- the value of the
contentproperty - See Also:
-
getExtras
public final javafx.scene.Node getExtras()Gets the value of theextrasproperty.- Property description:
- An extra node that might be displayed in the header or the footer of the dialog. This node will only be shown if custom header or footer factories make use of it. By default this node will not be visible anywhere.
- Returns:
- the value of the
extrasproperty - See Also:
-
extrasProperty
public final javafx.beans.property.ObjectProperty<javafx.scene.Node> extrasProperty()An extra node that might be displayed in the header or the footer of the dialog. This node will only be shown if custom header or footer factories make use of it. By default this node will not be visible anywhere.- Returns:
- an extra node to be placed in the header or footer
- See Also:
-
setExtras
public final void setExtras(javafx.scene.Node extras) Sets the value of theextrasproperty.- Property description:
- An extra node that might be displayed in the header or the footer of the dialog. This node will only be shown if custom header or footer factories make use of it. By default this node will not be visible anywhere.
- Parameters:
extras- the value for theextrasproperty- See Also:
-
titleProperty
public final javafx.beans.property.StringProperty titleProperty()- Returns:
- the
titleproperty - See Also:
-
getTitle
The title for the dialog. The default header factory will use this property to populate a label with it.- Returns:
- the dialog's title
-
setTitle
Sets the value of thetitleproperty.- Property description:
- Parameters:
title- the value for thetitleproperty- See Also:
-
getStyleClass
A list with additional styles that will be added to the content pane of the dialog.- Returns:
- additional css styles
-
showHeaderProperty
public final javafx.beans.property.BooleanProperty showHeaderProperty()Determines if the dialog will show the title / header at the bottom or not.- Returns:
- true if the dialog shows the button bar
- See Also:
-
isShowHeader
public final boolean isShowHeader()Gets the value of theshowHeaderproperty.- Property description:
- Determines if the dialog will show the title / header at the bottom or not.
- Returns:
- the value of the
showHeaderproperty - See Also:
-
setShowHeader
public final void setShowHeader(boolean showHeader) Sets the value of theshowHeaderproperty.- Property description:
- Determines if the dialog will show the title / header at the bottom or not.
- Parameters:
showHeader- the value for theshowHeaderproperty- See Also:
-
getButton
public final javafx.scene.control.Button getButton(javafx.scene.control.ButtonType type) Returns the button created for the given button type, but only if such a button type was requested for the dialog.- Parameters:
type- the button type- Returns:
- the button
- See Also:
-
getValidator
public final net.synedra.validatorfx.Validator getValidator()Gets the value of thevalidatorproperty.- Property description:
- A validator that can be used in the context of this dialog. Applications
can call
Validator.createCheck()to add one or more checks which will be validated once the user tries to commit the dialog. - Returns:
- the value of the
validatorproperty - See Also:
-
validatorProperty
public final javafx.beans.property.ObjectProperty<net.synedra.validatorfx.Validator> validatorProperty()A validator that can be used in the context of this dialog. Applications can callValidator.createCheck()to add one or more checks which will be validated once the user tries to commit the dialog.- Returns:
- the dialog's validator
- See Also:
-
setValidator
public final void setValidator(net.synedra.validatorfx.Validator validator) Sets the value of thevalidatorproperty.- Property description:
- A validator that can be used in the context of this dialog. Applications
can call
Validator.createCheck()to add one or more checks which will be validated once the user tries to commit the dialog. - Parameters:
validator- the value for thevalidatorproperty- See Also:
-
isResizable
public final boolean isResizable()Gets the value of theresizableproperty.- Property description:
- Determines if the user will be able to interactively resize the dialog. The default is false.
- Returns:
- the value of the
resizableproperty - See Also:
-
resizableProperty
public final javafx.beans.property.BooleanProperty resizableProperty()Determines if the user will be able to interactively resize the dialog. The default is false.- Returns:
- true if the dialog can be resized (default is false)
- See Also:
-
setResizable
public final void setResizable(boolean resizable) Sets the value of theresizableproperty.- Property description:
- Determines if the user will be able to interactively resize the dialog. The default is false.
- Parameters:
resizable- the value for theresizableproperty- See Also:
-