|
.useful Home Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.tree.DefaultTreeModel org.dotuseful.ui.tree.AutomatedTreeModel
AutomatedTreeModel extends DefaultTreeModel and uses AutomatedTreeNodes as its nodes.
Field Summary |
Fields inherited from class javax.swing.tree.DefaultTreeModel |
asksAllowsChildren, listenerList, root |
Constructor Summary | |
AutomatedTreeModel(AutomatedTreeNode root)
Creates an AutomatedTreeModel in which any node can have children. |
|
AutomatedTreeModel(AutomatedTreeNode root,
boolean asksAllowsChildren)
Creates an AutomatedTreeModel specifying whether any node can have children, or whether only certain nodes can have children. |
Method Summary | |
void |
setRoot(javax.swing.tree.TreeNode root)
Sets the root to root . |
void |
treeNodesChanged(javax.swing.event.TreeModelEvent e)
Invoked after a node (or a set of siblings) has changed in some way. |
void |
treeNodesInserted(javax.swing.event.TreeModelEvent e)
Invoked after nodes have been inserted into the tree. |
void |
treeNodesRemoved(javax.swing.event.TreeModelEvent e)
Invoked after nodes have been removed from the tree. |
void |
treeStructureChanged(javax.swing.event.TreeModelEvent e)
Invoked after the tree has drastically changed structure from a given node down. |
Methods inherited from class javax.swing.tree.DefaultTreeModel |
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, valueForPathChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AutomatedTreeModel(AutomatedTreeNode root)
root
- an AutomatedTreeNode object that is the root of the treeAutomatedTreeModel(AutomatedTreeNode, boolean)
public AutomatedTreeModel(AutomatedTreeNode root, boolean asksAllowsChildren)
root
- an AutomatedTreeNode object that is the root of the treeasksAllowsChildren
- a boolean, false if any node can have children, true if each
node is asked to see if it can have childrenDefaultTreeModel.asksAllowsChildren
Method Detail |
public void setRoot(javax.swing.tree.TreeNode root)
root
. A null root
implies
the tree is to display nothing, and is legal.
public void treeNodesChanged(javax.swing.event.TreeModelEvent e)
Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays, but other attributes have changed and may affect presentation. Example: the name of a file has changed, but it is in the same location in the file system.
treeNodesChanged
in interface javax.swing.event.TreeModelListener
public void treeNodesInserted(javax.swing.event.TreeModelEvent e)
Invoked after nodes have been inserted into the tree.
treeNodesInserted
in interface javax.swing.event.TreeModelListener
public void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree, this method may only be invoked once for the root of the removed subtree, not once for each individual set of siblings removed.
treeNodesRemoved
in interface javax.swing.event.TreeModelListener
public void treeStructureChanged(javax.swing.event.TreeModelEvent e)
Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.
treeStructureChanged
in interface javax.swing.event.TreeModelListener
|
© 2004 .useful community | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |