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

BeanChildren (NetBeans Nodes API) - NetBeans API Javadoc 5.5.0

org.openide.nodes 6.7.22

org.openide.nodes
Class BeanChildren

java.lang.Object
  extended by org.openide.nodes.Children
      extended by org.openide.nodes.Children.Array
          extended by org.openide.nodes.Children.Keys
              extended by org.openide.nodes.BeanChildren
All Implemented Interfaces:
Cloneable

public class BeanChildren
extends Children.Keys

Class that represents bean children of a JavaBeans context. It listens on the bean context changes and creates nodes for child beans. By default BeanNodes are created for all child beans, but this behaviour can be changed by providing a different factory to the constructor.


Nested Class Summary
static interface BeanChildren.Factory
          Controls which nodes are created for a child bean.
 
Nested classes/interfaces inherited from class org.openide.nodes.Children
Children.Array, Children.Keys, Children.Map, Children.SortedArray, Children.SortedMap
 
Field Summary
 
Fields inherited from class org.openide.nodes.Children.Array
nodes
 
Fields inherited from class org.openide.nodes.Children
LEAF, MUTEX
 
Constructor Summary
BeanChildren(BeanContext bean)
          Create BeanNode children based on a Bean context.
BeanChildren(BeanContext bean, BeanChildren.Factory factory)
          Create children based on a Bean context.
 
Method Summary
protected  void addNotify()
          Called when children are first asked for nodes.
protected  Node[] createNodes(Object subbean)
          Creates a node representant for given bean.
protected  void removeNotify()
          Removes the listener and does some necessary clean up.
 
Methods inherited from class org.openide.nodes.Children.Keys
add, clone, destroyNodes, refreshKey, remove, setBefore, setKeys, setKeys
 
Methods inherited from class org.openide.nodes.Children.Array
initCollection, refresh
 
Methods inherited from class org.openide.nodes.Children
findChild, getNode, getNodes, getNodes, getNodesCount, isInitialized, nodes
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanChildren

public BeanChildren(BeanContext bean)
Create BeanNode children based on a Bean context.

Parameters:
bean - the context

BeanChildren

public BeanChildren(BeanContext bean,
                    BeanChildren.Factory factory)
Create children based on a Bean context.

Parameters:
bean - the context
factory - a factory to use for creation of child nodes
Method Detail

createNodes

protected Node[] createNodes(Object subbean)
Creates a node representant for given bean. Uses factory to get the node.

Specified by:
createNodes in class Children.Keys
Parameters:
subbean - the bean from bean context
Returns:
node created by the factory

addNotify

protected void addNotify()
Description copied from class: Children
Called when children are first asked for nodes. Typical implementations at this time calculate their node list (or keys for Children.Keys etc.).
Notice: call to getNodes() inside of this method will return an empty array of nodes.

Overrides:
addNotify in class Children
See Also:
Children.isInitialized()

removeNotify

protected void removeNotify()
Removes the listener and does some necessary clean up.

Overrides:
removeNotify in class Children

org.openide.nodes 6.7.22

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