Class SimpleNode

    • Constructor Detail

      • SimpleNode

        public SimpleNode​(java.lang.String id)
      • SimpleNode

        public SimpleNode​(java.lang.String id,
                          java.lang.Object data)
    • Method Detail

      • getData

        public java.lang.Object getData()
        Description copied from interface: NavigationNode
        Returns data associated with the node. If no data are associated with the node it returns null.
        Specified by:
        getData in interface NavigationNode
        Returns:
        data associated with the node or null if no data are associated with the node
      • setData

        public void setData​(java.lang.Object data)
      • getLevel

        public int getLevel()
        Description copied from interface: NavigationNode
        Returns the level of this node. A root node has level = 0.
        Specified by:
        getLevel in interface NavigationNode
        Returns:
        level of this node
      • setLevel

        public void setLevel​(int level)
      • isDirectory

        public boolean isDirectory()
        Description copied from interface: NavigationNode
        Returns true if this node can have children.
        Specified by:
        isDirectory in interface NavigationNode
        Returns:
        true if this node can have children and false otherwise
      • setDirectory

        public void setDirectory​(boolean directory)
      • isExpandedByDefault

        public boolean isExpandedByDefault()
        Description copied from interface: NavigationNode
        Returns true if this node should be expanded by default when the tree is created.
        Specified by:
        isExpandedByDefault in interface NavigationNode
        Returns:
        true if this node should be expanded by default; false otherwise
      • setExpandedByDefault

        public void setExpandedByDefault​(boolean expandedByDefault)
      • getParent

        public NavigationNode getParent()
        Description copied from interface: NavigationNode
        Returns the parent node of this node.
        Specified by:
        getParent in interface NavigationNode
        Returns:
        parent node of this node or null if this is a root node
      • setParent

        public void setParent​(NavigationNode parent)
        Description copied from interface: NavigationNode
        Sets the parent of this node to the given node.
        Specified by:
        setParent in interface NavigationNode
        Parameters:
        parent - a node to become a parent of this node
      • setChildren

        public void setChildren​(java.util.List<NavigationNode> children)
        Description copied from interface: NavigationNode
        Sets the given list to be child nodes of this node.
        Specified by:
        setChildren in interface NavigationNode
        Parameters:
        children - list of nodes to become children of this node
      • addChild

        public void addChild​(NavigationNode child)
        Description copied from interface: NavigationNode
        Adds the given node as a child of this node.
        Specified by:
        addChild in interface NavigationNode
        Parameters:
        child - a node to become a child of this node
      • setActionAware

        public void setActionAware​(boolean actionAware)
      • isActionAware

        public boolean isActionAware()
        Description copied from interface: ActionAwareNode
        Defines if node is action aware
        Specified by:
        isActionAware in interface ActionAwareNode
        Returns:
        whether is aware or not