Class AbstractConfigTreeNode

    • Constructor Detail

      • AbstractConfigTreeNode

        protected AbstractConfigTreeNode​(String name)
        Creates a new config tree node with the given name. The node will be able to have child nodes.
        Parameters:
        name - the name of the node.
    • Method Detail

      • add

        public void add​(ConfigTreeNode node)
        Adds the given node to the tree model.
        Parameters:
        node - the new node that should be added.
      • reset

        protected void reset()
        Removes all child nodes.
      • getChildAt

        public TreeNode getChildAt​(int childIndex)
        Returns the child TreeNode at index childIndex.
        Specified by:
        getChildAt in interface TreeNode
        Parameters:
        childIndex - the index of the child node within this parent node.
        Returns:
        the child node.
      • getChildCount

        public int getChildCount()
        Returns the number of children TreeNodes the receiver contains.
        Specified by:
        getChildCount in interface TreeNode
        Returns:
        the number of child nodes.
      • getAllowsChildren

        public boolean getAllowsChildren()
        Returns true if the receiver allows children.
        Specified by:
        getAllowsChildren in interface TreeNode
        Returns:
        true, if this node allows child nodes.
      • getIndex

        public int getIndex​(TreeNode node)
        Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.
        Specified by:
        getIndex in interface TreeNode
        Parameters:
        node - the suspected child node.
        Returns:
        the index of the given node or -1 if the node is not contained in this node.
      • isLeaf

        public boolean isLeaf()
        Returns true if the receiver is a leaf.
        Specified by:
        isLeaf in interface TreeNode
        Returns:
        true, if this node is a leaf node, false otherwise.
      • children

        public Enumeration children()
        Returns the children of the receiver as an Enumeration.
        Specified by:
        children in interface TreeNode
        Returns:
        all childs as enumeration.
      • getName

        public String getName()
        Return the name of the node.
        Specified by:
        getName in interface ConfigTreeNode
        Returns:
        the name of the node.
      • setParent

        public void setParent​(TreeNode parent)
        Defines the parent of this node, or null if the node should not have a parent.
        Specified by:
        setParent in interface ConfigTreeNode
        Parameters:
        parent - the new parent or null.