Class BasicTreeModel

    • Field Detail

      • root

        protected TreeNode root
        The root node.
    • Constructor Detail

      • BasicTreeModel

        public BasicTreeModel()
        Create a new tree model.
      • BasicTreeModel

        public BasicTreeModel​(TreeNode root)
        Create a tree model with a root node.
        Parameters:
        root - The root node.
    • Method Detail

      • getRoot

        public TreeNode getRoot()
        Get the root node of the tree.
        Specified by:
        getRoot in interface TreeModel
        Returns:
        The root node.
      • setRoot

        public void setRoot​(TreeNode root)
        Set the root node.
        Parameters:
        root - New root.