当前页面: 
在线文档首页 > 
NetBeans API Javadoc (Current Development Version)
BeanChildren (Nodes API) - NetBeans API Javadoc (Current Development Version)
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.
| 
Nested Class Summary | 
static interface | 
BeanChildren.Factory
 
          Controls which nodes
 are created for a child bean. | 
 
 
 
 
 
 
| 
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. | 
 
 
 
 
 
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 contextfactory - a factory to use for creation of child nodes
 
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