站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

Visualizer (NetBeans Explorer API) - NetBeans API Javadoc 5.0.0

 

org.openide.explorer.view
Class Visualizer

java.lang.Object
  extended byorg.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.


Method Summary
static Node findNode(Object visualizer)
          Converts visualizer object back to its node representant.
static TreeNode findVisualizer(Node node)
          Methods that create a tree node for given node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.