org.openide.nodes
Class BeanChildren

java.lang.Object
  |
  +--org.openide.nodes.Children
        |
        +--org.openide.nodes.Children.Array
              |
              +--org.openide.nodes.Children.Keys
                    |
                    +--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.


Inner Class Summary
static interface BeanChildren.Factory
          Controls which nodes are created for a child bean.
 
Inner classes inherited from class org.openide.nodes.Children
Children.Array, Children.Keys, Children.Map, Children.SortedArray, Children.SortedMap
 
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, 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.
Overrides:
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.).
Overrides:
addNotify in class Children
Following copied from class: org.openide.nodes.Children
See Also:
Children.isInitialized()

removeNotify

protected void removeNotify()
Removes the listener and does some necessary clean up.
Overrides:
removeNotify in class Children


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.