Class NavigationDrawer.Header

  • All Implemented Interfaces:
    Styleable, EventTarget, Skinnable
    Enclosing class:
    NavigationDrawer

    public static final class NavigationDrawer.Header
    extends Control
    A convenience class for creating a default header for NavigationDrawer with styled implementations according to Material Design Guidelines. It consists of an image, title and subtitle.
    Since:
    2.0.0
    • Property Detail

      • title

        public final StringProperty titleProperty
        The title in Header generally reflects the current user. Nevertheless, it can be used to show any other information as seem appropriate to the user.
        Returns:
        An ObjectProperty representing the Header title.
      • subtitle

        public final StringProperty subtitleProperty
        The title in header generally reflects the current user email. Nevertheless, it can be used to show any other information as seem appropriate to the user.
        Returns:
        An ObjectProperty representing the subtitle of the Header.
    • Constructor Detail

      • Header

        public Header​(String title)
        Allocates a new header object with title assigned from the specified String.
        Parameters:
        title - The string representing the Title.
      • Header

        public Header​(String title,
                      String subtitle)
        Allocates a new header object with title and sub-title assigned from the specified Strings.
        Parameters:
        title - The string representing the title.
        subtitle - The string representing the subtitle.
      • Header

        public Header​(String title,
                      String subtitle,
                      Node graphic)
        Allocates a new header object with title, sub-title and primary image assigned.
        Parameters:
        title - A String representing the title of the Header.
        subtitle - A String representing the subtitle of the Header.
        graphic - A Node representing the graphic of the Header.
    • Method Detail

      • getTitle

        public final String getTitle()
        Returns a String with the title of the Header.
        Returns:
        A String representing the title of the Header.
      • titleProperty

        public final StringProperty titleProperty()
        The title in Header generally reflects the current user. Nevertheless, it can be used to show any other information as seem appropriate to the user.
        Returns:
        An ObjectProperty representing the Header title.
      • setTitle

        public final void setTitle​(String title)
        Sets current title of the Header.
        Parameters:
        title - The current title to be set.
      • getSubtitle

        public final String getSubtitle()
        Returns a String with the subtitle of the Header.
        Returns:
        A String representing the subtitle of the Header.
      • subtitleProperty

        public final StringProperty subtitleProperty()
        The title in header generally reflects the current user email. Nevertheless, it can be used to show any other information as seem appropriate to the user.
        Returns:
        An ObjectProperty representing the subtitle of the Header.
      • setSubtitle

        public final void setSubtitle​(String subtitle)
        Sets the current subtitle of the Header.
        Parameters:
        subtitle - The current subtitle to be set.
      • getGraphic

        public final Node getGraphic()
        Returns an node which is used as the graphic of the Header.
        Returns:
        A Node representing the graphic of the Header.
      • setGraphic

        public final void setGraphic​(Node graphic)
        Sets a node as the graphic in the Header.
        Parameters:
        graphic - A Node to set as the graphic.
      • setOnAction

        public final void setOnAction​(EventHandler<ActionEvent> value)
        Accepts an EventHandler which will be fired when the arrow, placed on the right bottom corner of the header, is touched, clicked or pressed. If this property is not set or set as null, then the arrow will not be visible.
        Parameters:
        value - The EventHandler for the header.