Class HiddenSidesPane

  • All Implemented Interfaces:
    Styleable, EventTarget, Skinnable

    public class HiddenSidesPane
    extends Control
    A pane used to display a full-size content node and four initially hidden nodes on the four sides. The hidden nodes can be made visible by moving the mouse cursor to the edges (see setTriggerDistance(double)) of the pane. The hidden node will appear (at its preferred width or height) with a short slide-in animation. The node will disappear again as soon as the mouse cursor exits it. A hidden node / side can also be pinned by calling setPinnedSide(Side). It will remain visible as long as it stays pinned.

    Screenshot

    The following screenshots shows the right side node hovering over a table after it was made visible:
    Screenshot of HiddenSidesPane

    Code Sample

     HiddenSidesPane pane = new HiddenSidesPane();
     pane.setContent(new TableView());
     pane.setRight(new ListView());
     
    • Constructor Detail

      • HiddenSidesPane

        public HiddenSidesPane​(Node content,
                               Node top,
                               Node right,
                               Node bottom,
                               Node left)
        Constructs a new pane with the given content node and the four side nodes. Each one of the side nodes may be null.
        Parameters:
        content - the primary node that will fill the entire width and height of the pane
        top - the hidden node on the top side
        right - the hidden node on the right side
        bottom - the hidden node on the bottom side
        left - the hidden node on the left side
      • HiddenSidesPane

        public HiddenSidesPane()
        Constructs a new pane with no content and no side nodes.
    • Method Detail

      • triggerDistanceProperty

        public final DoubleProperty triggerDistanceProperty()
        The property that stores the distance to the pane's edges that will trigger the appearance of the hidden side nodes.
        Setting the property to zero or a negative value will disable this functionality, so a hidden side can only be made visible with setPinnedSide(Side).
        See Also:
        getTriggerDistance(), setTriggerDistance(double)
      • getTriggerDistance

        public final double getTriggerDistance()
        Returns the value of the trigger distance property.
        Returns:
        the trigger distance property value
      • setTriggerDistance

        public final void setTriggerDistance​(double distance)
        Set the value of the trigger distance property.
        Setting the property to zero or a negative value will disable this functionality, so a hidden side can only be made visible with setPinnedSide(Side).
        Parameters:
        distance - the new value for the trigger distance property
      • contentProperty

        public final ObjectProperty<Node> contentProperty()
        The property that is used to store a reference to the content node. The content node will fill the entire width and height of the pane.
        See Also:
        getContent(), setContent(Node)
      • getContent

        public final Node getContent()
        Returns the value of the content node property.
        Returns:
        the content node property value
      • setContent

        public final void setContent​(Node content)
        Sets the value of the content node property.
        Parameters:
        content - the new content node
      • getTop

        public final Node getTop()
        Returns the value of the top node property.
        Returns:
        the top node property value
      • setTop

        public final void setTop​(Node top)
        Sets the value of the top node property.
        Parameters:
        top - the top node value
      • rightProperty

        public final ObjectProperty<Node> rightProperty()
        Returns the value of the right node property.
        Returns:
        the right node property value
      • getRight

        public final Node getRight()
        Returns the value of the right node property.
        Returns:
        the right node property value
      • setRight

        public final void setRight​(Node right)
        Sets the value of the right node property.
        Parameters:
        right - the right node value
      • bottomProperty

        public final ObjectProperty<Node> bottomProperty()
        Returns the value of the bottom node property.
        Returns:
        the bottom node property value
      • getBottom

        public final Node getBottom()
        Returns the value of the bottom node property.
        Returns:
        the bottom node property value
      • setBottom

        public final void setBottom​(Node bottom)
        Sets the value of the bottom node property.
        Parameters:
        bottom - the bottom node value
      • leftProperty

        public final ObjectProperty<Node> leftProperty()
        Returns the value of the left node property.
        Returns:
        the left node property value
      • getLeft

        public final Node getLeft()
        Returns the value of the left node property.
        Returns:
        the left node property value
      • setLeft

        public final void setLeft​(Node left)
        Sets the value of the left node property.
        Parameters:
        left - the left node value
      • getPinnedSide

        public final Side getPinnedSide()
        Returns the value of the pinned side property.
        Returns:
        the pinned side property value
      • setPinnedSide

        public final void setPinnedSide​(Side side)
        Sets the value of the pinned side property.
        Parameters:
        side - the new pinned side value
      • getAnimationDelay

        public final Duration getAnimationDelay()
        Returns the animation delay
        Returns:
        animation delay
      • setAnimationDelay

        public final void setAnimationDelay​(Duration duration)
        Set the animation delay
        Parameters:
        duration - slide in animation delay
      • getAnimationDuration

        public final Duration getAnimationDuration()
        Returns the animation delay
        Returns:
        animation delay
      • setAnimationDuration

        public final void setAnimationDuration​(Duration duration)
        Set the animation delay
        Parameters:
        duration - animation duration
      • show

        public void show​(Side side)
        Shows a specific side
        Parameters:
        side - the side to show
      • hide

        public void hide()
        Hides the currently showing side
      • getUserAgentStylesheet

        protected final String getUserAgentStylesheet​(Class<?> clazz,
                                                      String fileName)
        A helper method that ensures that the resource based lookup of the user agent stylesheet only happens once. Caches the external form of the resource.
        Parameters:
        clazz - the class used for the resource lookup
        fileName - the name of the user agent stylesheet
        Returns:
        the external form of the user agent stylesheet (the path)