Class DrawerStackPane

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

public class DrawerStackPane extends javafx.scene.layout.StackPane
A custom stackpane that supports a drawer view sliding in from bottom to top. The content of the drawer gets added in the normal way via the children list. The content for the drawer has to be added by calling setDrawerContent(Node). Features:
  • User can resize the drawer via a handle at the top
  • The drawer automatically closes completely if the user drags the resize handle below the lower bounds of the stackpane
  • Opening and closing can be animated (see setAnimateDrawer(boolean))
  • When the drawer is open the content of the stackpane will be blocked from user input via a dark semi-transparent glass pane
  • The glass pane fades in / out
  • The drawer can have its own preferred width (see setPreferredDrawerWidth(double))
  • The control can automatically persist the drawer height via the Java preferences API (see setPreferencesKey(String))
  • Auto hiding: drawer will close when the user clicks into the background (onto the glass pane)
  • Property Summary

    Properties
    Type
    Property
    Description
    final javafx.beans.property.BooleanProperty
    Determines whether the drawer will smoothly slide in / out when the user opens / closes it.
    final javafx.beans.property.ObjectProperty<javafx.util.Duration>
    The duration it takes to show / hide the drawer.
    javafx.beans.property.BooleanProperty
    Makes the drawer close if the user clicks in the background (onto the glass pane).
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    Stores the content of the drawer.
    final javafx.beans.property.DoubleProperty
    Stores the current height of the drawer as a value between 0 (not showing) and 1 (using full height of stackpane).
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    An extra node that will be added to the title bar.
    final javafx.beans.property.StringProperty
    The text shown as the title of the drawer.
    final javafx.beans.property.BooleanProperty
    Specifies whether the glass pane (used for blocking user input to nodes in the background) will use a fade transition when it becomes visible.
    javafx.beans.property.DoubleProperty
    The maximum drawer height, a value between 0 and 1 with 1 meaning that the drawer can be as high as the stackpane.
    javafx.beans.property.DoubleProperty
    The minimum drawer height, a value between 0 and 1 with 0 meaning that the drawer can be made completely invisible.
    javafx.beans.property.ObjectProperty<Runnable>
    A callback that will be called when the user clicks on the close button or onto the glass pane.
    final javafx.beans.property.ObjectProperty<Runnable>
    A callback that will be invoked when the drawer gets closed.
    final javafx.beans.property.StringProperty
    Stores the key used to store the drawer height via the preferences store.
    final javafx.beans.property.DoubleProperty
    Stores the preferred width of the drawer.
    final javafx.beans.property.BooleanProperty
    A flag used to control whether the drawer should show itself or not.
    final javafx.beans.property.BooleanProperty
    A flag used to signal whether the drawer should have a title bar or not.
    final javafx.beans.property.DoubleProperty
    Specifies a value used for padding to the left and the right of the drawer.
    final javafx.beans.property.ListProperty<javafx.scene.Node>
    The list of items to display in the toolbar.
    final javafx.beans.property.DoubleProperty
    Specifies a value used for padding at the top of the drawer.

    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 drawer stack pane.
    DrawerStackPane(javafx.scene.Node... nodes)
    Constructs a new drawer stack pane.
  • Method Summary

    Modifier and Type
    Method
    Description
    final javafx.beans.property.BooleanProperty
    Determines whether the drawer will smoothly slide in / out when the user opens / closes it.
    final javafx.beans.property.ObjectProperty<javafx.util.Duration>
    The duration it takes to show / hide the drawer.
    javafx.beans.property.BooleanProperty
    Makes the drawer close if the user clicks in the background (onto the glass pane).
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    Stores the content of the drawer.
    final javafx.beans.property.DoubleProperty
    Stores the current height of the drawer as a value between 0 (not showing) and 1 (using full height of stackpane).
    final javafx.beans.property.ObjectProperty<javafx.scene.Node>
    An extra node that will be added to the title bar.
    final javafx.beans.property.StringProperty
    The text shown as the title of the drawer.
    final javafx.beans.property.BooleanProperty
    Specifies whether the glass pane (used for blocking user input to nodes in the background) will use a fade transition when it becomes visible.
    final javafx.util.Duration
    Gets the value of the animationDuration property.
    static List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>>
     
    List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>>
     
    final javafx.scene.Node
    Gets the value of the drawerContent property.
    final double
    Gets the value of the drawerHeight property.
    final String
    Gets the value of the drawerTitle property.
    final javafx.scene.Node
    Gets the value of the drawerTitleExtra property.
    double
    Gets the value of the maxDrawerHeight property.
    double
    Gets the value of the minDrawerHeight property.
    Gets the value of the onCloseRequest property.
    final Runnable
    Gets the value of the onDrawerClose property.
    final String
    Returns the key that will be used when storing the last drawer height via the Java preferences API.
    final double
    Gets the value of the preferredDrawerWidth property.
    final double
    Gets the value of the sidePadding property.
    final javafx.collections.ObservableList<javafx.scene.Node>
    Gets the value of the toolbarItems property.
    final double
    Gets the value of the topPadding property.
     
    final boolean
    Gets the value of the animateDrawer property.
    boolean
    Gets the value of the autoHide property.
    final boolean
    Gets the value of the fadeInOut property.
    boolean
    Gets the value of the showDrawer property.
    final boolean
    Gets the value of the showDrawerTitle property.
    protected void
     
    javafx.beans.property.DoubleProperty
    The maximum drawer height, a value between 0 and 1 with 1 meaning that the drawer can be as high as the stackpane.
    javafx.beans.property.DoubleProperty
    The minimum drawer height, a value between 0 and 1 with 0 meaning that the drawer can be made completely invisible.
    javafx.beans.property.ObjectProperty<Runnable>
    A callback that will be called when the user clicks on the close button or onto the glass pane.
    final javafx.beans.property.ObjectProperty<Runnable>
    A callback that will be invoked when the drawer gets closed.
    final javafx.beans.property.StringProperty
    Stores the key used to store the drawer height via the preferences store.
    final javafx.beans.property.DoubleProperty
    Stores the preferred width of the drawer.
    final void
    setAnimateDrawer(boolean animateDrawer)
    Sets the value of the animateDrawer property.
    final void
    setAnimationDuration(javafx.util.Duration animationDuration)
    Sets the value of the animationDuration property.
    void
    setAutoHide(boolean autoHide)
    Sets the value of the autoHide property.
    final void
    setDrawerContent(javafx.scene.Node drawerContent)
    Sets the value of the drawerContent property.
    final void
    setDrawerHeight(double drawerHeight)
    Sets the value of the drawerHeight property.
    void
    setDrawerTitle(String drawerTitle)
    Sets the value of the drawerTitle property.
    final void
    setDrawerTitleExtra(javafx.scene.Node drawerTitleExtra)
    Sets the value of the drawerTitleExtra property.
    final void
    setFadeInOut(boolean fadeInOut)
    Sets the value of the fadeInOut property.
    void
    setMaxDrawerHeight(double maxDrawerHeight)
    Sets the value of the maxDrawerHeight property.
    void
    setMinDrawerHeight(double minDrawerHeight)
    Sets the value of the minDrawerHeight property.
    void
    setOnCloseRequest(Runnable onCloseRequest)
    Sets the value of the onCloseRequest property.
    final void
    setOnDrawerClose(Runnable onDrawerClose)
    Sets the value of the onDrawerClose property.
    final void
    Sets the key that will be used when storing the last drawer height via the Java preferences API.
    final void
    setPreferredDrawerWidth(double preferredDrawerWidth)
    Sets the value of the preferredDrawerWidth property.
    final void
    setShowDrawer(boolean showDrawer)
    Sets the value of the showDrawer property.
    final void
    setShowDrawerTitle(boolean showDrawerTitle)
    Sets the value of the showDrawerTitle property.
    final void
    setSidePadding(double sidePadding)
    Sets the value of the sidePadding property.
    final void
    setToolbarItems(javafx.collections.ObservableList<javafx.scene.Node> items)
    Sets the value of the toolbarItems property.
    final void
    setTopPadding(double topPadding)
    Sets the value of the topPadding property.
    final javafx.beans.property.BooleanProperty
    A flag used to control whether the drawer should show itself or not.
    final javafx.beans.property.BooleanProperty
    A flag used to signal whether the drawer should have a title bar or not.
    final javafx.beans.property.DoubleProperty
    Specifies a value used for padding to the left and the right of the drawer.
    final javafx.beans.property.ListProperty<javafx.scene.Node>
    The list of items to display in the toolbar.
    final javafx.beans.property.DoubleProperty
    Specifies a value used for padding at the top of the drawer.

    Methods inherited from class javafx.scene.layout.StackPane

    alignmentProperty, clearConstraints, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getAlignment, getAlignment, getContentBias, 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

    • fadeInOut

      public final javafx.beans.property.BooleanProperty fadeInOutProperty
      Specifies whether the glass pane (used for blocking user input to nodes in the background) will use a fade transition when it becomes visible.

      Can be set via CSS using the -fx-fade-in-out property. Valid values are: true or false. The default value is true.

      See Also:
    • autoHide

      public javafx.beans.property.BooleanProperty autoHideProperty
      Makes the drawer close if the user clicks in the background (onto the glass pane).
      See Also:
    • preferencesKey

      public final javafx.beans.property.StringProperty preferencesKeyProperty
      Stores the key used to store the drawer height via the preferences store.
      See Also:
    • maxDrawerHeight

      public javafx.beans.property.DoubleProperty maxDrawerHeightProperty
      The maximum drawer height, a value between 0 and 1 with 1 meaning that the drawer can be as high as the stackpane.

      Can be set via CSS using the -fx-max-drawer-height property. Valid values are: a number between 0 and 1. The default value is 1.0.

      See Also:
    • minDrawerHeight

      public javafx.beans.property.DoubleProperty minDrawerHeightProperty
      The minimum drawer height, a value between 0 and 1 with 0 meaning that the drawer can be made completely invisible. Even with a value larger than 0 the drawer can be made to hide by the user by continuing to drag below the drawer.

      Can be set via CSS using the -fx-min-drawer-height property. Valid values are: a number between 0 and 1. The default value is 0.1.

      See Also:
    • toolbarItems

      public final javafx.beans.property.ListProperty<javafx.scene.Node> toolbarItemsProperty
      The list of items to display in the toolbar.
      See Also:
    • onCloseRequest

      public javafx.beans.property.ObjectProperty<Runnable> onCloseRequestProperty
      A callback that will be called when the user clicks on the close button or onto the glass pane. The default implementation of this callback will eventually call setShowDrawer(boolean).
      See Also:
    • onDrawerClose

      public final javafx.beans.property.ObjectProperty<Runnable> onDrawerCloseProperty
      A callback that will be invoked when the drawer gets closed.
      See Also:
    • showDrawerTitle

      public final javafx.beans.property.BooleanProperty showDrawerTitleProperty
      A flag used to signal whether the drawer should have a title bar or not.

      Can be set via CSS using the -fx-show-drawer-title property. Valid values are: true or false. The default value is false.

      See Also:
    • drawerTitle

      public final javafx.beans.property.StringProperty drawerTitleProperty
      The text shown as the title of the drawer.
      See Also:
    • drawerContent

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> drawerContentProperty
      Stores the content of the drawer.
      See Also:
    • drawerTitleExtra

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> drawerTitleExtraProperty
      An extra node that will be added to the title bar.
      See Also:
    • showDrawer

      public final javafx.beans.property.BooleanProperty showDrawerProperty
      A flag used to control whether the drawer should show itself or not.
      See Also:
    • preferredDrawerWidth

      public final javafx.beans.property.DoubleProperty preferredDrawerWidthProperty
      Stores the preferred width of the drawer. Normally this value is equal to -1, which indicates that the drawer should use the entire available width. A value larger than -1 will make the pane use that value for the width of the drawer. A value of Region.USE_PREF_SIZE will make the pane use the preferred width of the content shown inside the drawer.

      Can be set via CSS using the -fx-preferred-drawer-width property. Valid values are: a positive number or Double.MAX_VALUE for full available width. The default value is Double.MAX_VALUE.

      See Also:
    • topPadding

      public final javafx.beans.property.DoubleProperty topPaddingProperty
      Specifies a value used for padding at the top of the drawer. This value will always be enforced,.

      Can be set via CSS using the -fx-drawer-top-padding property. Valid values are: non-negative numbers (pixels). The default value is 20.0.

      See Also:
    • sidePadding

      public final javafx.beans.property.DoubleProperty sidePaddingProperty
      Specifies a value used for padding to the left and the right of the drawer. This value will always be enforced, not matter what the preferred width of the drawer content is.

      Can be set via CSS using the -fx-drawer-side-padding property. Valid values are: non-negative numbers (pixels). The default value is 100.0.

      See Also:
    • animateDrawer

      public final javafx.beans.property.BooleanProperty animateDrawerProperty
      Determines whether the drawer will smoothly slide in / out when the user opens / closes it. If not then the drawer will just appear instantly.

      Can be set via CSS using the -fx-animate-drawer property. Valid values are: true or false. The default value is true.

      See Also:
    • drawerHeight

      public final javafx.beans.property.DoubleProperty drawerHeightProperty
      Stores the current height of the drawer as a value between 0 (not showing) and 1 (using full height of stackpane).
      See Also:
    • animationDuration

      public final javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationProperty
      The duration it takes to show / hide the drawer.

      Can be set via CSS using the -fx-animation-duration property. Valid values are: a number in milliseconds. The default value is 250.

      See Also:
  • Constructor Details

    • DrawerStackPane

      public DrawerStackPane(javafx.scene.Node... nodes)
      Constructs a new drawer stack pane.
      Parameters:
      nodes - the children nodes
    • DrawerStackPane

      public DrawerStackPane()
      Constructs a new drawer stack pane.
  • Method Details

    • getUserAgentStylesheet

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

      public final javafx.beans.property.BooleanProperty fadeInOutProperty()
      Specifies whether the glass pane (used for blocking user input to nodes in the background) will use a fade transition when it becomes visible.

      Can be set via CSS using the -fx-fade-in-out property. Valid values are: true or false. The default value is true.

      Returns:
      true if the glass pane will fade in / out smoothly when appearing / disappearing
      See Also:
    • isFadeInOut

      public final boolean isFadeInOut()
      Gets the value of the fadeInOut property.
      Property description:
      Specifies whether the glass pane (used for blocking user input to nodes in the background) will use a fade transition when it becomes visible.

      Can be set via CSS using the -fx-fade-in-out property. Valid values are: true or false. The default value is true.

      Returns:
      the value of the fadeInOut property
      See Also:
    • setFadeInOut

      public final void setFadeInOut(boolean fadeInOut)
      Sets the value of the fadeInOut property.
      Property description:
      Specifies whether the glass pane (used for blocking user input to nodes in the background) will use a fade transition when it becomes visible.

      Can be set via CSS using the -fx-fade-in-out property. Valid values are: true or false. The default value is true.

      Parameters:
      fadeInOut - the value for the fadeInOut property
      See Also:
    • isAutoHide

      public boolean isAutoHide()
      Gets the value of the autoHide property.
      Property description:
      Makes the drawer close if the user clicks in the background (onto the glass pane).
      Returns:
      the value of the autoHide property
      See Also:
    • autoHideProperty

      public javafx.beans.property.BooleanProperty autoHideProperty()
      Makes the drawer close if the user clicks in the background (onto the glass pane).
      Returns:
      true if the drawer hides when user clicks on background
      See Also:
    • setAutoHide

      public void setAutoHide(boolean autoHide)
      Sets the value of the autoHide property.
      Property description:
      Makes the drawer close if the user clicks in the background (onto the glass pane).
      Parameters:
      autoHide - the value for the autoHide property
      See Also:
    • preferencesKeyProperty

      public final javafx.beans.property.StringProperty preferencesKeyProperty()
      Stores the key used to store the drawer height via the preferences store.
      Returns:
      the preferences key property
      See Also:
    • setPreferencesKey

      public final void setPreferencesKey(String key)
      Sets the key that will be used when storing the last drawer height via the Java preferences API.
      Parameters:
      key - the preferences key
    • getPreferencesKey

      public final String getPreferencesKey()
      Returns the key that will be used when storing the last drawer height via the Java preferences API.
      Returns:
      the preferences key
    • getMaxDrawerHeight

      public double getMaxDrawerHeight()
      Gets the value of the maxDrawerHeight property.
      Property description:
      The maximum drawer height, a value between 0 and 1 with 1 meaning that the drawer can be as high as the stackpane.

      Can be set via CSS using the -fx-max-drawer-height property. Valid values are: a number between 0 and 1. The default value is 1.0.

      Returns:
      the value of the maxDrawerHeight property
      See Also:
    • maxDrawerHeightProperty

      public javafx.beans.property.DoubleProperty maxDrawerHeightProperty()
      The maximum drawer height, a value between 0 and 1 with 1 meaning that the drawer can be as high as the stackpane.

      Can be set via CSS using the -fx-max-drawer-height property. Valid values are: a number between 0 and 1. The default value is 1.0.

      Returns:
      the maximum drawer height (value between 0 and 1)
      See Also:
    • setMaxDrawerHeight

      public void setMaxDrawerHeight(double maxDrawerHeight)
      Sets the value of the maxDrawerHeight property.
      Property description:
      The maximum drawer height, a value between 0 and 1 with 1 meaning that the drawer can be as high as the stackpane.

      Can be set via CSS using the -fx-max-drawer-height property. Valid values are: a number between 0 and 1. The default value is 1.0.

      Parameters:
      maxDrawerHeight - the value for the maxDrawerHeight property
      See Also:
    • getMinDrawerHeight

      public double getMinDrawerHeight()
      Gets the value of the minDrawerHeight property.
      Property description:
      The minimum drawer height, a value between 0 and 1 with 0 meaning that the drawer can be made completely invisible. Even with a value larger than 0 the drawer can be made to hide by the user by continuing to drag below the drawer.

      Can be set via CSS using the -fx-min-drawer-height property. Valid values are: a number between 0 and 1. The default value is 0.1.

      Returns:
      the value of the minDrawerHeight property
      See Also:
    • minDrawerHeightProperty

      public javafx.beans.property.DoubleProperty minDrawerHeightProperty()
      The minimum drawer height, a value between 0 and 1 with 0 meaning that the drawer can be made completely invisible. Even with a value larger than 0 the drawer can be made to hide by the user by continuing to drag below the drawer.

      Can be set via CSS using the -fx-min-drawer-height property. Valid values are: a number between 0 and 1. The default value is 0.1.

      Returns:
      the minimum drawer height (value between 0 and 1)
      See Also:
    • setMinDrawerHeight

      public void setMinDrawerHeight(double minDrawerHeight)
      Sets the value of the minDrawerHeight property.
      Property description:
      The minimum drawer height, a value between 0 and 1 with 0 meaning that the drawer can be made completely invisible. Even with a value larger than 0 the drawer can be made to hide by the user by continuing to drag below the drawer.

      Can be set via CSS using the -fx-min-drawer-height property. Valid values are: a number between 0 and 1. The default value is 0.1.

      Parameters:
      minDrawerHeight - the value for the minDrawerHeight property
      See Also:
    • layoutChildren

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

      public final javafx.collections.ObservableList<javafx.scene.Node> getToolbarItems()
      Gets the value of the toolbarItems property.
      Property description:
      The list of items to display in the toolbar.
      Returns:
      the value of the toolbarItems property
      See Also:
    • toolbarItemsProperty

      public final javafx.beans.property.ListProperty<javafx.scene.Node> toolbarItemsProperty()
      The list of items to display in the toolbar.
      Returns:
      the toolbar items / toolbar buttons
      See Also:
    • setToolbarItems

      public final void setToolbarItems(javafx.collections.ObservableList<javafx.scene.Node> items)
      Sets the value of the toolbarItems property.
      Property description:
      The list of items to display in the toolbar.
      Parameters:
      items - the value for the toolbarItems property
      See Also:
    • getOnCloseRequest

      public Runnable getOnCloseRequest()
      Gets the value of the onCloseRequest property.
      Property description:
      A callback that will be called when the user clicks on the close button or onto the glass pane. The default implementation of this callback will eventually call setShowDrawer(boolean).
      Returns:
      the value of the onCloseRequest property
      See Also:
    • onCloseRequestProperty

      public javafx.beans.property.ObjectProperty<Runnable> onCloseRequestProperty()
      A callback that will be called when the user clicks on the close button or onto the glass pane. The default implementation of this callback will eventually call setShowDrawer(boolean).
      Returns:
      the callback for closing the drawer
      See Also:
    • setOnCloseRequest

      public void setOnCloseRequest(Runnable onCloseRequest)
      Sets the value of the onCloseRequest property.
      Property description:
      A callback that will be called when the user clicks on the close button or onto the glass pane. The default implementation of this callback will eventually call setShowDrawer(boolean).
      Parameters:
      onCloseRequest - the value for the onCloseRequest property
      See Also:
    • getOnDrawerClose

      public final Runnable getOnDrawerClose()
      Gets the value of the onDrawerClose property.
      Property description:
      A callback that will be invoked when the drawer gets closed.
      Returns:
      the value of the onDrawerClose property
      See Also:
    • onDrawerCloseProperty

      public final javafx.beans.property.ObjectProperty<Runnable> onDrawerCloseProperty()
      A callback that will be invoked when the drawer gets closed.
      Returns:
      a callback that will be invoked when the drawer gets closed
      See Also:
    • setOnDrawerClose

      public final void setOnDrawerClose(Runnable onDrawerClose)
      Sets the value of the onDrawerClose property.
      Property description:
      A callback that will be invoked when the drawer gets closed.
      Parameters:
      onDrawerClose - the value for the onDrawerClose property
      See Also:
    • isShowDrawerTitle

      public final boolean isShowDrawerTitle()
      Gets the value of the showDrawerTitle property.
      Property description:
      A flag used to signal whether the drawer should have a title bar or not.

      Can be set via CSS using the -fx-show-drawer-title property. Valid values are: true or false. The default value is false.

      Returns:
      the value of the showDrawerTitle property
      See Also:
    • showDrawerTitleProperty

      public final javafx.beans.property.BooleanProperty showDrawerTitleProperty()
      A flag used to signal whether the drawer should have a title bar or not.

      Can be set via CSS using the -fx-show-drawer-title property. Valid values are: true or false. The default value is false.

      Returns:
      true if the drawer shows a title
      See Also:
    • setShowDrawerTitle

      public final void setShowDrawerTitle(boolean showDrawerTitle)
      Sets the value of the showDrawerTitle property.
      Property description:
      A flag used to signal whether the drawer should have a title bar or not.

      Can be set via CSS using the -fx-show-drawer-title property. Valid values are: true or false. The default value is false.

      Parameters:
      showDrawerTitle - the value for the showDrawerTitle property
      See Also:
    • getDrawerTitle

      public final String getDrawerTitle()
      Gets the value of the drawerTitle property.
      Property description:
      The text shown as the title of the drawer.
      Returns:
      the value of the drawerTitle property
      See Also:
    • drawerTitleProperty

      public final javafx.beans.property.StringProperty drawerTitleProperty()
      The text shown as the title of the drawer.
      Returns:
      the drawer title text
      See Also:
    • setDrawerTitle

      public void setDrawerTitle(String drawerTitle)
      Sets the value of the drawerTitle property.
      Property description:
      The text shown as the title of the drawer.
      Parameters:
      drawerTitle - the value for the drawerTitle property
      See Also:
    • getDrawerContent

      public final javafx.scene.Node getDrawerContent()
      Gets the value of the drawerContent property.
      Property description:
      Stores the content of the drawer.
      Returns:
      the value of the drawerContent property
      See Also:
    • drawerContentProperty

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> drawerContentProperty()
      Stores the content of the drawer.
      Returns:
      the drawer content
      See Also:
    • setDrawerContent

      public final void setDrawerContent(javafx.scene.Node drawerContent)
      Sets the value of the drawerContent property.
      Property description:
      Stores the content of the drawer.
      Parameters:
      drawerContent - the value for the drawerContent property
      See Also:
    • getDrawerTitleExtra

      public final javafx.scene.Node getDrawerTitleExtra()
      Gets the value of the drawerTitleExtra property.
      Property description:
      An extra node that will be added to the title bar.
      Returns:
      the value of the drawerTitleExtra property
      See Also:
    • drawerTitleExtraProperty

      public final javafx.beans.property.ObjectProperty<javafx.scene.Node> drawerTitleExtraProperty()
      An extra node that will be added to the title bar.
      Returns:
      an extra node that will be added to the title bar
      See Also:
    • setDrawerTitleExtra

      public final void setDrawerTitleExtra(javafx.scene.Node drawerTitleExtra)
      Sets the value of the drawerTitleExtra property.
      Property description:
      An extra node that will be added to the title bar.
      Parameters:
      drawerTitleExtra - the value for the drawerTitleExtra property
      See Also:
    • isShowDrawer

      public boolean isShowDrawer()
      Gets the value of the showDrawer property.
      Property description:
      A flag used to control whether the drawer should show itself or not.
      Returns:
      the value of the showDrawer property
      See Also:
    • showDrawerProperty

      public final javafx.beans.property.BooleanProperty showDrawerProperty()
      A flag used to control whether the drawer should show itself or not.
      Returns:
      true if the drawer should show itself
      See Also:
    • setShowDrawer

      public final void setShowDrawer(boolean showDrawer)
      Sets the value of the showDrawer property.
      Property description:
      A flag used to control whether the drawer should show itself or not.
      Parameters:
      showDrawer - the value for the showDrawer property
      See Also:
    • getPreferredDrawerWidth

      public final double getPreferredDrawerWidth()
      Gets the value of the preferredDrawerWidth property.
      Property description:
      Stores the preferred width of the drawer. Normally this value is equal to -1, which indicates that the drawer should use the entire available width. A value larger than -1 will make the pane use that value for the width of the drawer. A value of Region.USE_PREF_SIZE will make the pane use the preferred width of the content shown inside the drawer.

      Can be set via CSS using the -fx-preferred-drawer-width property. Valid values are: a positive number or Double.MAX_VALUE for full available width. The default value is Double.MAX_VALUE.

      Returns:
      the value of the preferredDrawerWidth property
      See Also:
    • preferredDrawerWidthProperty

      public final javafx.beans.property.DoubleProperty preferredDrawerWidthProperty()
      Stores the preferred width of the drawer. Normally this value is equal to -1, which indicates that the drawer should use the entire available width. A value larger than -1 will make the pane use that value for the width of the drawer. A value of Region.USE_PREF_SIZE will make the pane use the preferred width of the content shown inside the drawer.

      Can be set via CSS using the -fx-preferred-drawer-width property. Valid values are: a positive number or Double.MAX_VALUE for full available width. The default value is Double.MAX_VALUE.

      Returns:
      the preferred drawer width
      See Also:
    • setPreferredDrawerWidth

      public final void setPreferredDrawerWidth(double preferredDrawerWidth)
      Sets the value of the preferredDrawerWidth property.
      Property description:
      Stores the preferred width of the drawer. Normally this value is equal to -1, which indicates that the drawer should use the entire available width. A value larger than -1 will make the pane use that value for the width of the drawer. A value of Region.USE_PREF_SIZE will make the pane use the preferred width of the content shown inside the drawer.

      Can be set via CSS using the -fx-preferred-drawer-width property. Valid values are: a positive number or Double.MAX_VALUE for full available width. The default value is Double.MAX_VALUE.

      Parameters:
      preferredDrawerWidth - the value for the preferredDrawerWidth property
      See Also:
    • getTopPadding

      public final double getTopPadding()
      Gets the value of the topPadding property.
      Property description:
      Specifies a value used for padding at the top of the drawer. This value will always be enforced,.

      Can be set via CSS using the -fx-drawer-top-padding property. Valid values are: non-negative numbers (pixels). The default value is 20.0.

      Returns:
      the value of the topPadding property
      See Also:
    • topPaddingProperty

      public final javafx.beans.property.DoubleProperty topPaddingProperty()
      Specifies a value used for padding at the top of the drawer. This value will always be enforced,.

      Can be set via CSS using the -fx-drawer-top-padding property. Valid values are: non-negative numbers (pixels). The default value is 20.0.

      Returns:
      the padding used for the top of the drawer
      See Also:
    • setTopPadding

      public final void setTopPadding(double topPadding)
      Sets the value of the topPadding property.
      Property description:
      Specifies a value used for padding at the top of the drawer. This value will always be enforced,.

      Can be set via CSS using the -fx-drawer-top-padding property. Valid values are: non-negative numbers (pixels). The default value is 20.0.

      Parameters:
      topPadding - the value for the topPadding property
      See Also:
    • getSidePadding

      public final double getSidePadding()
      Gets the value of the sidePadding property.
      Property description:
      Specifies a value used for padding to the left and the right of the drawer. This value will always be enforced, not matter what the preferred width of the drawer content is.

      Can be set via CSS using the -fx-drawer-side-padding property. Valid values are: non-negative numbers (pixels). The default value is 100.0.

      Returns:
      the value of the sidePadding property
      See Also:
    • sidePaddingProperty

      public final javafx.beans.property.DoubleProperty sidePaddingProperty()
      Specifies a value used for padding to the left and the right of the drawer. This value will always be enforced, not matter what the preferred width of the drawer content is.

      Can be set via CSS using the -fx-drawer-side-padding property. Valid values are: non-negative numbers (pixels). The default value is 100.0.

      Returns:
      the padding used for the left and right side next to the drawer
      See Also:
    • setSidePadding

      public final void setSidePadding(double sidePadding)
      Sets the value of the sidePadding property.
      Property description:
      Specifies a value used for padding to the left and the right of the drawer. This value will always be enforced, not matter what the preferred width of the drawer content is.

      Can be set via CSS using the -fx-drawer-side-padding property. Valid values are: non-negative numbers (pixels). The default value is 100.0.

      Parameters:
      sidePadding - the value for the sidePadding property
      See Also:
    • isAnimateDrawer

      public final boolean isAnimateDrawer()
      Gets the value of the animateDrawer property.
      Property description:
      Determines whether the drawer will smoothly slide in / out when the user opens / closes it. If not then the drawer will just appear instantly.

      Can be set via CSS using the -fx-animate-drawer property. Valid values are: true or false. The default value is true.

      Returns:
      the value of the animateDrawer property
      See Also:
    • animateDrawerProperty

      public final javafx.beans.property.BooleanProperty animateDrawerProperty()
      Determines whether the drawer will smoothly slide in / out when the user opens / closes it. If not then the drawer will just appear instantly.

      Can be set via CSS using the -fx-animate-drawer property. Valid values are: true or false. The default value is true.

      Returns:
      true if the drawer will be animated (slide in / out)
      See Also:
    • setAnimateDrawer

      public final void setAnimateDrawer(boolean animateDrawer)
      Sets the value of the animateDrawer property.
      Property description:
      Determines whether the drawer will smoothly slide in / out when the user opens / closes it. If not then the drawer will just appear instantly.

      Can be set via CSS using the -fx-animate-drawer property. Valid values are: true or false. The default value is true.

      Parameters:
      animateDrawer - the value for the animateDrawer property
      See Also:
    • getDrawerHeight

      public final double getDrawerHeight()
      Gets the value of the drawerHeight property.
      Property description:
      Stores the current height of the drawer as a value between 0 (not showing) and 1 (using full height of stackpane).
      Returns:
      the value of the drawerHeight property
      See Also:
    • drawerHeightProperty

      public final javafx.beans.property.DoubleProperty drawerHeightProperty()
      Stores the current height of the drawer as a value between 0 (not showing) and 1 (using full height of stackpane).
      Returns:
      the drawer height (value between 0 and 1)
      See Also:
    • setDrawerHeight

      public final void setDrawerHeight(double drawerHeight)
      Sets the value of the drawerHeight property.
      Property description:
      Stores the current height of the drawer as a value between 0 (not showing) and 1 (using full height of stackpane).
      Parameters:
      drawerHeight - the value for the drawerHeight property
      See Also:
    • getAnimationDuration

      public final javafx.util.Duration getAnimationDuration()
      Gets the value of the animationDuration property.
      Property description:
      The duration it takes to show / hide the drawer.

      Can be set via CSS using the -fx-animation-duration property. Valid values are: a number in milliseconds. The default value is 250.

      Returns:
      the value of the animationDuration property
      See Also:
    • animationDurationProperty

      public final javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationProperty()
      The duration it takes to show / hide the drawer.

      Can be set via CSS using the -fx-animation-duration property. Valid values are: a number in milliseconds. The default value is 250.

      Returns:
      the animation duration
      See Also:
    • setAnimationDuration

      public final void setAnimationDuration(javafx.util.Duration animationDuration)
      Sets the value of the animationDuration property.
      Property description:
      The duration it takes to show / hide the drawer.

      Can be set via CSS using the -fx-animation-duration property. Valid values are: a number in milliseconds. The default value is 250.

      Parameters:
      animationDuration - the value for the animationDuration property
      See Also:
    • getCssMetaData

      public List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> getCssMetaData()
      Specified by:
      getCssMetaData in interface javafx.css.Styleable
      Overrides:
      getCssMetaData in class javafx.scene.layout.StackPane
    • getClassCssMetaData

      public static List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> getClassCssMetaData()