org.openide.explorer.view
Class Visualizer
java.lang.Object
|
+--org.openide.explorer.view.Visualizer
- public class Visualizer
- extends Object
This class provide access to thread safe layer that
reflects the hierarchy of Nodes, but is updated only in
event dispatch thread (in contrast to nodes that can be updated from any thread).
That is why this class is useful for writers of explorer views,
because it guarantees that all changes will be done safely.
NodeTreeModel, NodeListModel, etc. use these objects as its
model values.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
findVisualizer
public static TreeNode findVisualizer(Node node)
- Methods that create a tree node for given node.
The tree node reflects the state of the associated node as close
as possible, but is updated asynchronously in event dispatch thread.
This method can be called only from AWT-Event dispatch thread.
- Parameters:
node
- node to create safe representant for- Returns:
- tree node that represents the node
findNode
public static Node findNode(Object visualizer)
- Converts visualizer object back to its node representant.
- Parameters:
visualizer
- visualizer create by findVisualizer method- Returns:
- node associated with the visualizer
- Throws:
ClassCastException
- if the parameter is invalid
Built on December 12 2001. | Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.