Example usage for Java javax.swing.tree DefaultTreeModel fields, constructors, methods, implement or subclass
The text is from its open source code.
DefaultTreeModel(TreeNode root) Creates a tree in which any node can have children. | |
DefaultTreeModel(TreeNode root, boolean asksAllowsChildren) Creates a tree specifying whether any node can have children, or whether only certain nodes can have children. |
void | addTreeModelListener(TreeModelListener l) Adds a listener for the TreeModelEvent posted after the tree changes. |
Object | getChild(Object parent, int index) Returns the child of parent at index index in the parent's child array. |
int | getChildCount(Object parent) Returns the number of children of parent. |
TreeNode[] | getPathToRoot(TreeNode aNode) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array. |
Object | getRoot() Returns the root of the tree. |
void | insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index) Invoked this to insert newChild at location index in parents children. |
void | nodeChanged(TreeNode node) Invoke this method after you've changed how node is to be represented in the tree. |
void | nodeStructureChanged(TreeNode node) Invoke this method if you've totally changed the children of node and its children's children... |
void | nodesWereInserted(TreeNode node, int[] childIndices) Invoke this method after you've inserted some TreeNodes into node. |
void | reload() Invoke this method if you've modified the TreeNode s upon which this model depends. |
void | reload(TreeNode node) Invoke this method if you've modified the TreeNode s upon which this model depends. |
void | removeNodeFromParent(MutableTreeNode node) Message this to remove node from its parent. |
void | setRoot(TreeNode root) Sets the root to root . |