org.openide.nodes 6.7.22

Class BeanChildren

  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:

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
Fields inherited from class org.openide.nodes.Children
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


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

bean - the context


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

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


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
subbean - the bean from bean context
node created by the factory


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.

addNotify in class Children
See Also:


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

removeNotify in class Children

org.openide.nodes 6.7.22

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