Class DialogPane

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
com.dlsc.gemsfx.DialogPane
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget

public class DialogPane extends javafx.scene.layout.Pane
A pane that allows applications to display a lightweight dialog right inside the application window instead of a separate window. The dialogs are animated and fly-in from top to center and fly-out from center to top.

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.

Example

To show an information dialog one can simply call:

    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.
See Also:
  • Property Summary

    Properties
    Type
    Property
    Description
    final javafx.beans.property.BooleanProperty
    Determines if the dialogs will be animated when they appear.
    final javafx.beans.property.ObjectProperty<javafx.util.Duration>
    Stores the duration used to animate the fly-in / fly-out of the dialogs.
    final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<javafx.scene.control.ButtonType>>
    A string converter can be applied to easily manipulate the default text representation of the various button types.
    final javafx.beans.property.ListProperty<DialogPane.Dialog<?>>
    Stores the list of currently active dialogs.
    final javafx.beans.property.BooleanProperty
    Controls whether the glass pane and the dialogs will animate their opacity during showing or hiding dialogs.
    final javafx.beans.property.ObjectProperty<javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node>>
    A callback used as a factory for creating the footer for each dialog.
    final javafx.beans.property.ObjectProperty<javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node>>
    A callback used as a factory for creating the header for each dialog.
    final javafx.beans.property.ObjectProperty<Supplier<javafx.scene.control.Label>>
    A supplier used for creating the label instances that will be used by the standard dialogs.
    final javafx.beans.property.DoubleProperty
    Defines the padding around a maximized dialog in the dialog pane.
    final javafx.beans.property.StringProperty
     
    final javafx.beans.property.ReadOnlyBooleanProperty
    A read-only property used to signal that the pane is currently showing a dialog or not.

    Properties inherited from class javafx.scene.layout.Region

    background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width

    Properties inherited from class javafx.scene.Parent

    needsLayout

    Properties inherited from class javafx.scene.Node

    accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The default resize handler is used to persist the dialog's width and height after the user performed a resize operation on the dialog.
    static class 
    Represents a dialog that can be displayed to the user.
    static class 
    The default footer / button bar implementation for dialogs managed by the DialogPane.
    static class 
    The default header implementation for dialogs managed by the DialogPane.
    static enum 
    The various dialog types supported by DialogPane.
  • Field Summary

    Fields inherited from class javafx.scene.layout.Region

    USE_COMPUTED_SIZE, USE_PREF_SIZE

    Fields inherited from class javafx.scene.Node

    BASELINE_OFFSET_SAME_AS_HEIGHT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new dialog pane.
  • Method Summary

    Modifier and Type
    Method
    Description
    final javafx.beans.property.BooleanProperty
    Determines if the dialogs will be animated when they appear.
    final javafx.beans.property.ObjectProperty<javafx.util.Duration>
    Stores the duration used to animate the fly-in / fly-out of the dialogs.
    final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<javafx.scene.control.ButtonType>>
    A string converter can be applied to easily manipulate the default text representation of the various button types.
    final javafx.beans.property.ListProperty<DialogPane.Dialog<?>>
    Stores the list of currently active dialogs.
    final javafx.beans.property.BooleanProperty
    Controls whether the glass pane and the dialogs will animate their opacity during showing or hiding dialogs.
    final javafx.beans.property.ObjectProperty<javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node>>
    A callback used as a factory for creating the footer for each dialog.
    final javafx.util.Duration
    Gets the value of the property animationDuration.
    final javafx.util.StringConverter<javafx.scene.control.ButtonType>
    Gets the value of the property converter.
    final javafx.collections.ObservableList<DialogPane.Dialog<?>>
    The list of currently active / showing dialogs.
    final javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node>
    Gets the value of the property footerFactory.
    final GlassPane
    Retrieves the glass pane associated with this dialog pane.
    final javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node>
    Gets the value of the property headerFactory.
    final Supplier<javafx.scene.control.Label>
    Gets the value of the property labelSupplier.
    final double
    Gets the value of the property maximizedPadding.
    final String
    Gets the value of the property sendButtonText.
     
    final javafx.beans.property.ObjectProperty<javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node>>
    A callback used as a factory for creating the header for each dialog.
    void
    Hides all currently active dialogs.
    void
    Hides the given dialog.
    final boolean
    Gets the value of the property animateDialogs.
    final boolean
    Gets the value of the property fadeInOut.
    final boolean
    Gets the value of the property showingDialog.
    final javafx.beans.property.ObjectProperty<Supplier<javafx.scene.control.Label>>
    A supplier used for creating the label instances that will be used by the standard dialogs.
    protected void
     
    final javafx.beans.property.DoubleProperty
    Defines the padding around a maximized dialog in the dialog pane.
    final javafx.beans.property.StringProperty
     
    final void
    setAnimateDialogs(boolean animate)
    Sets the value of the property animateDialogs.
    final void
    setAnimationDuration(javafx.util.Duration animationDuration)
    Sets the value of the property animationDuration.
    final void
    setConverter(javafx.util.StringConverter<javafx.scene.control.ButtonType> converter)
    Sets the value of the property converter.
    final void
    setDialogs(javafx.collections.ObservableList<DialogPane.Dialog<?>> dialogs)
    Sets the value of the property dialogs.
    final void
    setFadeInOut(boolean animate)
    Sets the value of the property fadeInOut.
    final void
    setFooterFactory(javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node> footerFactory)
    Sets the value of the property footerFactory.
    final void
    setHeaderFactory(javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node> headerFactory)
    Sets the value of the property headerFactory.
    final void
    setLabelSupplier(Supplier<javafx.scene.control.Label> labelSupplier)
    Sets the value of the property labelSupplier.
    final void
    setMaximizedPadding(double maximizedPadding)
    Sets the value of the property maximizedPadding.
    final void
    setSendButtonText(String sendButtonText)
    Sets the value of the property sendButtonText.
    Creates and shows a dialog that shows a busy indicator / busy animation.
    final DialogPane.Dialog<javafx.scene.control.ButtonType>
    showConfirmation(String title, String message)
    Creates and shows a confirmation dialog.
    final DialogPane.Dialog<javafx.scene.control.ButtonType>
    showConfirmation(String title, String message, List<javafx.scene.control.ButtonType> buttonTypes)
    Creates and shows a confirmation dialog.
    void
    Makes the given dialog visible in the pane.
    showError(String title, Exception exception)
    Creates and shows an error message dialog.
    showError(String title, String message)
    Creates and shows an error message dialog.
    showError(String title, String message, String details)
    Creates and shows an error message dialog.
    showError(String title, String message, String details, Runnable onSend)
    Creates and shows an error message dialog.
    showError(String title, String message, Throwable exception)
    Creates and shows an error message dialog.
    final DialogPane.Dialog<javafx.scene.control.ButtonType>
    showInformation(String title, String message)
    Creates and shows an information dialog.
    final DialogPane.Dialog<javafx.scene.control.ButtonType>
    showInformation(String title, String message, List<javafx.scene.control.ButtonType> buttons)
    Creates and shows an information dialog.
    final javafx.beans.property.ReadOnlyBooleanProperty
    A read-only property used to signal that the pane is currently showing a dialog or not.
    final <T> DialogPane.Dialog<T>
    showNode(DialogPane.Type type, String title, javafx.scene.Node node)
    Shows an arbitrary node in a dialog.
    final <T> DialogPane.Dialog<T>
    showNode(DialogPane.Type type, String title, javafx.scene.Node node, boolean maximize)
    Shows an arbitrary node in a dialog.
    final <T> DialogPane.Dialog<T>
    showNode(DialogPane.Type type, String title, javafx.scene.Node node, boolean maximize, List<javafx.scene.control.ButtonType> buttons)
    Shows an arbitrary node in a dialog.
    final <T> DialogPane.Dialog<T>
    showNode(DialogPane.Type type, String title, javafx.scene.Node node, boolean maximize, List<javafx.scene.control.ButtonType> buttons, boolean sameWidthButtons)
    Shows an arbitrary node in a dialog.
    final <T> DialogPane.Dialog<T>
    showNode(DialogPane.Type type, String title, javafx.scene.Node node, boolean maximize, List<javafx.scene.control.ButtonType> buttons, boolean sameWidthButtons, javafx.beans.property.BooleanProperty validProperty)
    Shows an arbitrary node in a dialog.
    final <T> DialogPane.Dialog<T>
    showNode(DialogPane.Type type, String title, javafx.scene.Node node, List<javafx.scene.control.ButtonType> buttons)
    Shows an arbitrary node in a dialog.
    showTextInput(String title, String text)
    Creates and shows a text input dialog.
    showTextInput(String title, String text, boolean multiline)
    Creates and shows a text input dialog.
    showTextInput(String title, String message, String text, boolean multiline)
    Creates and shows a text input dialog.
    showTextInput(String title, String message, String prompt, String text, boolean multiline)
    Creates and shows a text input dialog.
    showTextInput(String title, String message, String prompt, String text, boolean multiline, List<javafx.scene.control.ButtonType> buttonTypes)
    Creates and shows a text input dialog.
    final DialogPane.Dialog<javafx.scene.control.ButtonType>
    showWarning(String title, String message)
    Creates and shows a warning dialog.
    final DialogPane.Dialog<javafx.scene.control.ButtonType>
    showWarning(String title, String message, List<javafx.scene.control.ButtonType> buttonTypes)
    Creates and shows a warning dialog.

    Methods inherited from class javafx.scene.layout.Pane

    getChildren

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty

    Methods inherited from class javafx.scene.Parent

    getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds

    Methods inherited from class javafx.scene.Node

    accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Property Details

    • headerFactory

      public final javafx.beans.property.ObjectProperty<javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node>> headerFactoryProperty
      A callback used as a factory for creating the header for each dialog. The dialog pane comes with its own built-in header factory. Applications only need to specify one if they completely want to change the appearance and / or the behaviour of the title area.
      See Also:
    • footerFactory

      public final javafx.beans.property.ObjectProperty<javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node>> footerFactoryProperty
      A callback used as a factory for creating the footer for each dialog. The dialog pane comes with its own built-in footer factory. Applications only need to specify one if they completely want to change the appearance and / or the behaviour of the button bar.
      See Also:
    • dialogs

      public final javafx.beans.property.ListProperty<DialogPane.Dialog<?>> dialogsProperty
      Stores the list of currently active dialogs.
      See Also:
    • animationDuration

      public final javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationProperty
      Stores the duration used to animate the fly-in / fly-out of the dialogs. The default value is 100 milliseconds.
      See Also:
    • sendButtonText

      public final javafx.beans.property.StringProperty sendButtonTextProperty
      See Also:
    • labelSupplier

      public final javafx.beans.property.ObjectProperty<Supplier<javafx.scene.control.Label>> labelSupplierProperty
      A supplier used for creating the label instances that will be used by the standard dialogs.
      See Also:
    • animateDialogs

      public final javafx.beans.property.BooleanProperty animateDialogsProperty
      Determines if the dialogs will be animated when they appear. Animation is currently a simple fly-in / fly-out. Other animation types could be considered in the future.
      See Also:
    • fadeInOut

      public final javafx.beans.property.BooleanProperty fadeInOutProperty
      Controls whether the glass pane and the dialogs will animate their opacity during showing or hiding dialogs.
      See Also:
    • showingDialog

      public final javafx.beans.property.ReadOnlyBooleanProperty showingDialogProperty
      A read-only property used to signal that the pane is currently showing a dialog or not.
      See Also:
    • maximizedPadding

      public final javafx.beans.property.DoubleProperty maximizedPaddingProperty
      Defines the padding around a maximized dialog in the dialog pane. A padding of zero would result in the dialog to use the entire width and height of the dialog pane.
      See Also:
    • converter

      public final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<javafx.scene.control.ButtonType>> converterProperty
      A string converter can be applied to easily manipulate the default text representation of the various button types. An example could for example be that the application design asks for all UPPER case letters to be used for the buttons.
      See Also:
  • Constructor Details

    • DialogPane

      public DialogPane()
      Constructs a new dialog pane.
  • Method Details

    • getUserAgentStylesheet

      public String getUserAgentStylesheet()
      Overrides:
      getUserAgentStylesheet in class javafx.scene.layout.Region
    • getGlassPane

      public final GlassPane getGlassPane()
      Retrieves the glass pane associated with this dialog pane. The glass pane is a transparent overlay that can be used to block user input.
      Returns:
      the glass pane object
    • getHeaderFactory

      public final javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node> getHeaderFactory()
      Gets the value of the property headerFactory.
      Property description:
      A callback used as a factory for creating the header for each dialog. The dialog pane comes with its own built-in header factory. Applications only need to specify one if they completely want to change the appearance and / or the behaviour of the title area.
    • headerFactoryProperty

      public final javafx.beans.property.ObjectProperty<javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node>> headerFactoryProperty()
      A callback used as a factory for creating the header for each dialog. The dialog pane comes with its own built-in header factory. Applications only need to specify one if they completely want to change the appearance and / or the behaviour of the title area.
      See Also:
    • setHeaderFactory

      public final void setHeaderFactory(javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node> headerFactory)
      Sets the value of the property headerFactory.
      Property description:
      A callback used as a factory for creating the header for each dialog. The dialog pane comes with its own built-in header factory. Applications only need to specify one if they completely want to change the appearance and / or the behaviour of the title area.
    • getFooterFactory

      public final javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node> getFooterFactory()
      Gets the value of the property footerFactory.
      Property description:
      A callback used as a factory for creating the footer for each dialog. The dialog pane comes with its own built-in footer factory. Applications only need to specify one if they completely want to change the appearance and / or the behaviour of the button bar.
    • footerFactoryProperty

      public final javafx.beans.property.ObjectProperty<javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node>> footerFactoryProperty()
      A callback used as a factory for creating the footer for each dialog. The dialog pane comes with its own built-in footer factory. Applications only need to specify one if they completely want to change the appearance and / or the behaviour of the button bar.
      See Also:
    • setFooterFactory

      public final void setFooterFactory(javafx.util.Callback<DialogPane.Dialog<?>,javafx.scene.Node> footerFactory)
      Sets the value of the property footerFactory.
      Property description:
      A callback used as a factory for creating the footer for each dialog. The dialog pane comes with its own built-in footer factory. Applications only need to specify one if they completely want to change the appearance and / or the behaviour of the button bar.
    • getDialogs

      public final javafx.collections.ObservableList<DialogPane.Dialog<?>> getDialogs()
      The list of currently active / showing dialogs.
      Returns:
      the list of dialogs currently showing
    • dialogsProperty

      public final javafx.beans.property.ListProperty<DialogPane.Dialog<?>> dialogsProperty()
      Stores the list of currently active dialogs.
      See Also:
    • setDialogs

      public final void setDialogs(javafx.collections.ObservableList<DialogPane.Dialog<?>> dialogs)
      Sets the value of the property dialogs.
      Property description:
      Stores the list of currently active dialogs.
    • getAnimationDuration

      public final javafx.util.Duration getAnimationDuration()
      Gets the value of the property animationDuration.
      Property description:
      Stores the duration used to animate the fly-in / fly-out of the dialogs. The default value is 100 milliseconds.
    • animationDurationProperty

      public final javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationProperty()
      Stores the duration used to animate the fly-in / fly-out of the dialogs. The default value is 100 milliseconds.
      See Also:
    • setAnimationDuration

      public final void setAnimationDuration(javafx.util.Duration animationDuration)
      Sets the value of the property animationDuration.
      Property description:
      Stores the duration used to animate the fly-in / fly-out of the dialogs. The default value is 100 milliseconds.
    • showDialog

      public void showDialog(DialogPane.Dialog<?> dialog)
      Makes the given dialog visible in the pane.
      Parameters:
      dialog - the dialog to show
      Throws:
      IllegalArgumentException - when the given dialog belongs to a different dialog pane
    • hideDialog

      public void hideDialog(DialogPane.Dialog<?> dialog)
      Hides the given dialog.
      Parameters:
      dialog - the dialog to hide
      Throws:
      IllegalArgumentException - when the given dialog belongs to a different dialog pane
    • hideAllDialogs

      public void hideAllDialogs()
      Hides all currently active dialogs.
      See Also:
    • showError

      public final DialogPane.Dialog<Void> showError(String title, String message)
      Creates and shows an error message dialog.
      Parameters:
      title - the title for the dialog
      message - the main error message
      Returns:
      the dialog
    • showError

      public final DialogPane.Dialog<Void> showError(String title, String message, Throwable exception)
      Creates and shows an error message dialog.
      Parameters:
      title - the title for the dialog
      message - the main error message
      exception - an exception that will be used to provide more details
      Returns:
      the dialog
    • showError

      public final DialogPane.Dialog<Void> showError(String title, Exception exception)
      Creates and shows an error message dialog.
      Parameters:
      title - the title for the dialog
      exception - an exception that will be used to provide the main message additional details
      Returns:
      the dialog
    • showError

      public final DialogPane.Dialog<Void> showError(String title, String message, String details)
      Creates and shows an error message dialog.
      Parameters:
      title - the title for the dialog
      message - the main error message
      details - additional details
      Returns:
      the dialog
    • showError

      public final DialogPane.Dialog<Void> showError(String title, String message, String details, Runnable onSend)
      Creates and shows an error message dialog.
      Parameters:
      title - the title for the dialog
      message - the main error message
      details - additional details
      onSend - an optional action to send out / forward the error message
      Returns:
      the dialog
    • getSendButtonText

      public final String getSendButtonText()
      Gets the value of the property sendButtonText.
      Property description:
    • sendButtonTextProperty

      public final javafx.beans.property.StringProperty sendButtonTextProperty()
      See Also:
    • setSendButtonText

      public final void setSendButtonText(String sendButtonText)
      Sets the value of the property sendButtonText.
      Property description:
    • showWarning

      public final DialogPane.Dialog<javafx.scene.control.ButtonType> showWarning(String title, String message)
      Creates and shows a warning dialog.
      Parameters:
      title - the text shown in the header of the dialog
      message - the warning message
      Returns:
      the dialog
    • showWarning

      public final DialogPane.Dialog<javafx.scene.control.ButtonType> showWarning(String title, String message, List<javafx.scene.control.ButtonType> buttonTypes)
      Creates and shows a warning dialog.
      Parameters:
      title - the text shown in the header of the dialog
      message - the warning message
      Returns:
      the dialog
    • showConfirmation

      public final DialogPane.Dialog<javafx.scene.control.ButtonType> showConfirmation(String title, String message)
      Creates and shows a confirmation dialog.
      Parameters:
      title - the text shown in the header of the dialog
      message - the main message, usually a question
      Returns:
      the dialog
    • showConfirmation

      public final DialogPane.Dialog<javafx.scene.control.ButtonType> showConfirmation(String title, String message, List<javafx.scene.control.ButtonType> buttonTypes)
      Creates and shows a confirmation dialog.
      Parameters:
      title - the text shown in the header of the dialog
      message - the main message, usually a question
      buttonTypes - the buttons to show in the footer
      Returns:
      the dialog
    • showInformation

      public final DialogPane.Dialog<javafx.scene.control.ButtonType> showInformation(String title, String message)
      Creates and shows an information dialog.
      Parameters:
      title - the text shown in the header of the dialog
      message - the main message, usually a question
      Returns:
      the dialog
    • showInformation

      public final DialogPane.Dialog<javafx.scene.control.ButtonType> showInformation(String title, String message, List<javafx.scene.control.ButtonType> buttons)
      Creates and shows an information dialog.
      Parameters:
      title - the text shown in the header of the dialog
      message - the main message, usually a question
      buttons - the list of buttons to create in the footer / button bar
      Returns:
      the dialog
    • showTextInput

      public final DialogPane.Dialog<String> showTextInput(String title, String text)
      Creates and shows a text input dialog.
      Parameters:
      title - the text shown in the header of the dialog
      text - the initial text to show
      Returns:
      the dialog
    • showTextInput

      public final DialogPane.Dialog<String> showTextInput(String title, String text, boolean multiline)
      Creates and shows a text input dialog.
      Parameters:
      title - the text shown in the header of the dialog
      text - the initial text to show
      multiline - if true the dialog will show a text area, otherwise a text field
      Returns:
      the dialog
    • showTextInput

      public final DialogPane.Dialog<String> showTextInput(String title, String message, String text, boolean multiline)
      Creates and shows a text input dialog.
      Parameters:
      title - the text shown in the header of the dialog
      message - the main message, usually a question
      text - the initial text to show
      multiline - if true the dialog will show a text area, otherwise a text field
      Returns:
      the dialog
    • showTextInput

      public final DialogPane.Dialog<String> showTextInput(String title, String message, String prompt, String text, boolean multiline)
      Creates and shows a text input dialog.
      Parameters:
      title - the text shown in the header of the dialog
      message - the main message, usually a question
      prompt - the prompt text for the text input control
      text - the initial text to show
      multiline - if true the dialog will show a text area, otherwise a text field
      Returns:
      the dialog
    • showTextInput

      public final DialogPane.Dialog<String> showTextInput(String title, String message, String prompt, String text, boolean multiline, List<javafx.scene.control.ButtonType> buttonTypes)
      Creates and shows a text input dialog.
      Parameters:
      title - the text shown in the header of the dialog
      message - the main message, usually a question
      prompt - the prompt text for the text input control
      text - the initial text to show
      multiline - if true the dialog will show a text area, otherwise a text field
      Returns:
      the dialog
    • showNode

      public final <T> DialogPane.Dialog<T> showNode(DialogPane.Type type, String title, javafx.scene.Node node)
      Shows an arbitrary node in a dialog.
      Type Parameters:
      T - the type of the value provided by the dialog
      Parameters:
      type - the type of dialog (info, warning, error, ....)
      title - the text shown in the title section / header of the dialog
      node - the node to show
      Returns:
      the dialog
    • showNode

      public final <T> DialogPane.Dialog<T> showNode(DialogPane.Type type, String title, javafx.scene.Node node, boolean maximize)
      Shows an arbitrary node in a dialog.
      Type Parameters:
      T - the type of the value provided by the dialog
      Parameters:
      type - the type of dialog (info, warning, error, ....)
      title - the text shown in the title section / header of the dialog
      node - the node to show
      maximize - if true the dialog will use the maximum size available
      Returns:
      the dialog
    • showNode

      public final <T> DialogPane.Dialog<T> showNode(DialogPane.Type type, String title, javafx.scene.Node node, List<javafx.scene.control.ButtonType> buttons)
      Shows an arbitrary node in a dialog.
      Type Parameters:
      T - the type of the value provided by the dialog
      Parameters:
      type - the type of dialog (info, warning, error, ....)
      title - the text shown in the title section / header of the dialog
      node - the node to show
      buttons - a list of buttons to create inside the footer / button bar
      Returns:
      the dialog
    • showNode

      public final <T> DialogPane.Dialog<T> showNode(DialogPane.Type type, String title, javafx.scene.Node node, boolean maximize, List<javafx.scene.control.ButtonType> buttons)
      Shows an arbitrary node in a dialog.
      Type Parameters:
      T - the type of the value provided by the dialog
      Parameters:
      type - the type of dialog (info, warning, error, ....)
      title - the text shown in the title section / header of the dialog
      node - the node to show
      maximize - if true the dialog will use the maximum size available
      buttons - a list of buttons to create inside the footer / button bar
      Returns:
      the dialog
    • showNode

      public final <T> DialogPane.Dialog<T> showNode(DialogPane.Type type, String title, javafx.scene.Node node, boolean maximize, List<javafx.scene.control.ButtonType> buttons, boolean sameWidthButtons)
      Shows an arbitrary node in a dialog.
      Type Parameters:
      T - the type of the value provided by the dialog
      Parameters:
      type - the type of dialog (info, warning, error, ....)
      title - the text shown in the title section / header of the dialog
      node - the node to show
      maximize - if true the dialog will use the maximum size available
      buttons - a list of buttons to create inside the footer / button bar
      sameWidthButtons - if true all buttons in the footer / button bar will have the same width
      Returns:
      the dialog
    • showNode

      public final <T> DialogPane.Dialog<T> showNode(DialogPane.Type type, String title, javafx.scene.Node node, boolean maximize, List<javafx.scene.control.ButtonType> buttons, boolean sameWidthButtons, javafx.beans.property.BooleanProperty validProperty)
      Shows an arbitrary node in a dialog.
      Type Parameters:
      T - the type of the value provided by the dialog
      Parameters:
      type - the type of dialog (info, warning, error, ....)
      title - the text shown in the title section / header of the dialog
      node - the node to show
      maximize - if true the dialog will use the maximum size available
      buttons - a list of buttons to create inside the footer / button bar
      sameWidthButtons - if true all buttons in the footer / button bar will have the same width
      validProperty - a validity property that will be bound to the validity property of the dialog
      Returns:
      the dialog
    • showBusyIndicator

      public final DialogPane.Dialog<Void> showBusyIndicator()
      Creates and shows a dialog that shows a busy indicator / busy animation.
      Returns:
      the create dialog
    • getLabelSupplier

      public final Supplier<javafx.scene.control.Label> getLabelSupplier()
      Gets the value of the property labelSupplier.
      Property description:
      A supplier used for creating the label instances that will be used by the standard dialogs.
    • labelSupplierProperty

      public final javafx.beans.property.ObjectProperty<Supplier<javafx.scene.control.Label>> labelSupplierProperty()
      A supplier used for creating the label instances that will be used by the standard dialogs.
      See Also:
    • setLabelSupplier

      public final void setLabelSupplier(Supplier<javafx.scene.control.Label> labelSupplier)
      Sets the value of the property labelSupplier.
      Property description:
      A supplier used for creating the label instances that will be used by the standard dialogs.
    • animateDialogsProperty

      public final javafx.beans.property.BooleanProperty animateDialogsProperty()
      Determines if the dialogs will be animated when they appear. Animation is currently a simple fly-in / fly-out. Other animation types could be considered in the future.
      See Also:
    • isAnimateDialogs

      public final boolean isAnimateDialogs()
      Gets the value of the property animateDialogs.
      Property description:
      Determines if the dialogs will be animated when they appear. Animation is currently a simple fly-in / fly-out. Other animation types could be considered in the future.
    • setAnimateDialogs

      public final void setAnimateDialogs(boolean animate)
      Sets the value of the property animateDialogs.
      Property description:
      Determines if the dialogs will be animated when they appear. Animation is currently a simple fly-in / fly-out. Other animation types could be considered in the future.
    • fadeInOutProperty

      public final javafx.beans.property.BooleanProperty fadeInOutProperty()
      Controls whether the glass pane and the dialogs will animate their opacity during showing or hiding dialogs.
      See Also:
    • isFadeInOut

      public final boolean isFadeInOut()
      Gets the value of the property fadeInOut.
      Property description:
      Controls whether the glass pane and the dialogs will animate their opacity during showing or hiding dialogs.
    • setFadeInOut

      public final void setFadeInOut(boolean animate)
      Sets the value of the property fadeInOut.
      Property description:
      Controls whether the glass pane and the dialogs will animate their opacity during showing or hiding dialogs.
    • showingDialogProperty

      public final javafx.beans.property.ReadOnlyBooleanProperty showingDialogProperty()
      A read-only property used to signal that the pane is currently showing a dialog or not.
      See Also:
    • isShowingDialog

      public final boolean isShowingDialog()
      Gets the value of the property showingDialog.
      Property description:
      A read-only property used to signal that the pane is currently showing a dialog or not.
    • getMaximizedPadding

      public final double getMaximizedPadding()
      Gets the value of the property maximizedPadding.
      Property description:
      Defines the padding around a maximized dialog in the dialog pane. A padding of zero would result in the dialog to use the entire width and height of the dialog pane.
    • maximizedPaddingProperty

      public final javafx.beans.property.DoubleProperty maximizedPaddingProperty()
      Defines the padding around a maximized dialog in the dialog pane. A padding of zero would result in the dialog to use the entire width and height of the dialog pane.
      See Also:
    • setMaximizedPadding

      public final void setMaximizedPadding(double maximizedPadding)
      Sets the value of the property maximizedPadding.
      Property description:
      Defines the padding around a maximized dialog in the dialog pane. A padding of zero would result in the dialog to use the entire width and height of the dialog pane.
    • layoutChildren

      protected void layoutChildren()
      Overrides:
      layoutChildren in class javafx.scene.Parent
    • getConverter

      public final javafx.util.StringConverter<javafx.scene.control.ButtonType> getConverter()
      Gets the value of the property converter.
      Property description:
      A string converter can be applied to easily manipulate the default text representation of the various button types. An example could for example be that the application design asks for all UPPER case letters to be used for the buttons.
    • converterProperty

      public final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<javafx.scene.control.ButtonType>> converterProperty()
      A string converter can be applied to easily manipulate the default text representation of the various button types. An example could for example be that the application design asks for all UPPER case letters to be used for the buttons.
      See Also:
    • setConverter

      public final void setConverter(javafx.util.StringConverter<javafx.scene.control.ButtonType> converter)
      Sets the value of the property converter.
      Property description:
      A string converter can be applied to easily manipulate the default text representation of the various button types. An example could for example be that the application design asks for all UPPER case letters to be used for the buttons.