org.openide.explorer 6.5.22 1

Class NodeTreeModel

  extended by javax.swing.tree.DefaultTreeModel
      extended by org.openide.explorer.view.NodeTreeModel
All Implemented Interfaces:
Serializable, TreeModel

public class NodeTreeModel
extends DefaultTreeModel

Model for displaying the nodes in tree.

See Also:
Serialized Form

Field Summary
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
Constructor Summary
          Creates new NodeTreeModel
NodeTreeModel(Node root)
          Creates new NodeTreeModel
Method Summary
 void setNode(Node root)
          Changes the root of the model.
 void valueForPathChanged(TreePath path, Object newValue)
          This sets the user object of the TreeNode identified by path and posts a node changed.
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, setRoot
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public NodeTreeModel()
Creates new NodeTreeModel


public NodeTreeModel(Node root)
Creates new NodeTreeModel

root - the root of the model
Method Detail


public void setNode(Node root)
Changes the root of the model. This is thread safe method.

root - the root of the model


public void valueForPathChanged(TreePath path,
                                Object newValue)
This sets the user object of the TreeNode identified by path and posts a node changed. If you use custom user objects in the TreeModel you'returngoing to need to subclass this and set the user object of the changed node to something meaningful.

Specified by:
valueForPathChanged in interface TreeModel
valueForPathChanged in class DefaultTreeModel

org.openide.explorer 6.5.22 1

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.