Class DialogPane

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

public class DialogPane extends javafx.scene.layout.StackPane
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:
  • 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.
  • 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.StackPane

    alignment

    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
  • 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 animationDuration property.
    final javafx.util.StringConverter<javafx.scene.control.ButtonType>
    Gets the value of the converter property.
    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 footerFactory property.
    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 headerFactory property.
    final Supplier<javafx.scene.control.Label>
    Gets the value of the labelSupplier property.
    final double
    Gets the value of the maximizedPadding property.
    final String
    Gets the value of the sendButtonText property.
     
    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 animateDialogs property.
    final boolean
    Gets the value of the fadeInOut property.
    final boolean
    Gets the value of the showingDialog property.
    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 animateDialogs property.
    final void
    setAnimationDuration(javafx.util.Duration animationDuration)
    Sets the value of the animationDuration property.
    final void
    setConverter(javafx.util.StringConverter<javafx.scene.control.ButtonType> converter)
    Sets the value of the converter property.
    final void
    setDialogs(javafx.collections.ObservableList<DialogPane.Dialog<?>> dialogs)
    Sets the value of the dialogs property.
    final void
    setFadeInOut(boolean animate)
    Sets the value of the fadeInOut property.
    final void
    setFooterFactory(javafx.util.Callback<DialogPane.Dialog<?>, javafx.scene.Node> footerFactory)
    Sets the value of the footerFactory property.
    final void
    setHeaderFactory(javafx.util.Callback<DialogPane.Dialog<?>, javafx.scene.Node> headerFactory)
    Sets the value of the headerFactory property.
    final void
    setLabelSupplier(Supplier<javafx.scene.control.Label> labelSupplier)
    Sets the value of the labelSupplier property.
    final void
    setMaximizedPadding(double maximizedPadding)
    Sets the value of the maximizedPadding property.
    final void
    setSendButtonText(String sendButtonText)
    Sets the value of the sendButtonText property.
    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.StackPane

    alignmentProperty, clearConstraints, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getAlignment, getAlignment, getClassCssMetaData, getContentBias, getCssMetaData, getMargin, requestLayout, setAlignment, setAlignment, setMargin

    Methods inherited from class javafx.scene.layout.Pane

    getChildren

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, 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, 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, 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, requestFocusTraversal, 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 Object

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

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Property Details

  • 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 headerFactory property.
      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.
      Returns:
      the value of the headerFactory property
      See Also:
    • 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.
      Returns:
      the header factory
      See Also:
    • setHeaderFactory

      public final void setHeaderFactory(javafx.util.Callback<DialogPane.Dialog<?>, javafx.scene.Node> headerFactory)
      Sets the value of the headerFactory property.
      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.
      Parameters:
      headerFactory - the value for the headerFactory property
      See Also:
    • getFooterFactory

      public final javafx.util.Callback<DialogPane.Dialog<?>, javafx.scene.Node> getFooterFactory()
      Gets the value of the footerFactory property.
      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.
      Returns:
      the value of the footerFactory property
      See Also:
    • 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.
      Returns:
      the header factory
      See Also:
    • setFooterFactory

      public final void setFooterFactory(javafx.util.Callback<DialogPane.Dialog<?>, javafx.scene.Node> footerFactory)
      Sets the value of the footerFactory property.
      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.
      Parameters:
      footerFactory - the value for the footerFactory property
      See Also:
    • 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.
      Returns:
      the list of dialogs
      See Also:
    • setDialogs

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

      public final javafx.util.Duration getAnimationDuration()
      Gets the value of the animationDuration property.
      Property description:
      Stores the duration used to animate the fly-in / fly-out of the dialogs. The default value is 100 milliseconds.
      Returns:
      the value of the animationDuration property
      See Also:
    • 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.
      Returns:
      the animation duration
      See Also:
    • setAnimationDuration

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

      public void showDialog(DialogPane.Dialog<?> dialog)
      Makes the given dialog visible in the pane. A dialog can define a delay duration which will be used to delay the appearance of the dialog.
      Parameters:
      dialog - the dialog to show
      Throws:
      IllegalArgumentException - when the given dialog belongs to a different dialog pane
      See Also:
    • hideDialog

      public void hideDialog(DialogPane.Dialog<?> dialog)
      Hides the given dialog.
      Parameters:
      dialog - the dialog to hide
    • 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 sendButtonText property.
      Property description:
      Returns:
      the value of the sendButtonText property
      See Also:
    • sendButtonTextProperty

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

      public final void setSendButtonText(String sendButtonText)
      Sets the value of the sendButtonText property.
      Property description:
      Parameters:
      sendButtonText - the value for the sendButtonText property
      See Also:
    • 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 created dialog
    • getLabelSupplier

      public final Supplier<javafx.scene.control.Label> getLabelSupplier()
      Gets the value of the labelSupplier property.
      Property description:
      A supplier used for creating the label instances that will be used by the standard dialogs.
      Returns:
      the value of the labelSupplier property
      See Also:
    • 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.
      Returns:
      the label supplier / callback / factory
      See Also:
    • setLabelSupplier

      public final void setLabelSupplier(Supplier<javafx.scene.control.Label> labelSupplier)
      Sets the value of the labelSupplier property.
      Property description:
      A supplier used for creating the label instances that will be used by the standard dialogs.
      Parameters:
      labelSupplier - the value for the labelSupplier property
      See Also:
    • 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.
      Returns:
      true if the dialog will be animated when appearing / disappearing
      See Also:
    • isAnimateDialogs

      public final boolean isAnimateDialogs()
      Gets the value of the animateDialogs property.
      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.
      Returns:
      the value of the animateDialogs property
      See Also:
    • setAnimateDialogs

      public final void setAnimateDialogs(boolean animate)
      Sets the value of the animateDialogs property.
      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.
      Parameters:
      animate - the value for the animateDialogs property
      See Also:
    • 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.
      Returns:
      true if fade-in / fade-out will be used for showing / hiding dialogs
      See Also:
    • isFadeInOut

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

      public final void setFadeInOut(boolean animate)
      Sets the value of the fadeInOut property.
      Property description:
      Controls whether the glass pane and the dialogs will animate their opacity during showing or hiding dialogs.
      Parameters:
      animate - the value for the fadeInOut property
      See Also:
    • 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.
      Returns:
      true if at least one dialog is currently showing
      See Also:
    • isShowingDialog

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

      public final double getMaximizedPadding()
      Gets the value of the maximizedPadding property.
      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.
      Returns:
      the value of the maximizedPadding property
      See Also:
    • 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.
      Returns:
      the padding around a maximized dialog
      See Also:
    • setMaximizedPadding

      public final void setMaximizedPadding(double maximizedPadding)
      Sets the value of the maximizedPadding property.
      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.
      Parameters:
      maximizedPadding - the value for the maximizedPadding property
      See Also:
    • layoutChildren

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

      public final javafx.util.StringConverter<javafx.scene.control.ButtonType> getConverter()
      Gets the value of the converter property.
      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.
      Returns:
      the value of the converter property
      See Also:
    • 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.
      Returns:
      a string converter
      See Also:
    • setConverter

      public final void setConverter(javafx.util.StringConverter<javafx.scene.control.ButtonType> converter)
      Sets the value of the converter property.
      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.
      Parameters:
      converter - the value for the converter property
      See Also: