Class BranchTreeNode

  • All Implemented Interfaces:
    javax.swing.tree.TreeNode

    public class BranchTreeNode
    extends LeafTreeNode

    BranchTreeNode implements the Swing TreeNode interface to bind dom4j XML Branch nodes (i.e. Document and Element nodes) to a Swing TreeModel.

    • Field Detail

      • children

        protected java.util.List<javax.swing.tree.TreeNode> children
        Stores the child tree nodes
    • Constructor Detail

      • BranchTreeNode

        public BranchTreeNode()
      • BranchTreeNode

        public BranchTreeNode(Branch xmlNode)
      • BranchTreeNode

        public BranchTreeNode(javax.swing.tree.TreeNode parent,
                              Branch xmlNode)
    • Method Detail

      • children

        public java.util.Enumeration<javax.swing.tree.TreeNode> children()
        Specified by:
        children in interface javax.swing.tree.TreeNode
        Overrides:
        children in class LeafTreeNode
      • getAllowsChildren

        public boolean getAllowsChildren()
        Specified by:
        getAllowsChildren in interface javax.swing.tree.TreeNode
        Overrides:
        getAllowsChildren in class LeafTreeNode
      • getChildAt

        public javax.swing.tree.TreeNode getChildAt(int childIndex)
        Specified by:
        getChildAt in interface javax.swing.tree.TreeNode
        Overrides:
        getChildAt in class LeafTreeNode
      • getChildCount

        public int getChildCount()
        Specified by:
        getChildCount in interface javax.swing.tree.TreeNode
        Overrides:
        getChildCount in class LeafTreeNode
      • getIndex

        public int getIndex(javax.swing.tree.TreeNode node)
        Specified by:
        getIndex in interface javax.swing.tree.TreeNode
        Overrides:
        getIndex in class LeafTreeNode
      • isLeaf

        public boolean isLeaf()
        Specified by:
        isLeaf in interface javax.swing.tree.TreeNode
        Overrides:
        isLeaf in class LeafTreeNode
      • getChildList

        protected java.util.List<javax.swing.tree.TreeNode> getChildList()
        Uses Lazy Initialization pattern to create a List of children
        Returns:
        DOCUMENT ME!
      • createChildList

        protected java.util.List<javax.swing.tree.TreeNode> createChildList()
        Factory method to create List of children TreeNodes
        Returns:
        DOCUMENT ME!
      • createChildTreeNode

        protected javax.swing.tree.TreeNode createChildTreeNode(Node xmlNode)
        Factory method to create child tree nodes for a given XML node type
        Parameters:
        xmlNode - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getXmlBranch

        protected Branch getXmlBranch()