Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

cern::gp::explorer::test::helpers::RecursiveChildrenListManager Class Reference

List of all members.

Public Member Functions

 RecursiveChildrenListManager ()
 RecursiveChildrenListManager (int children)
 RecursiveChildrenListManager (int children, int childrenPerParent)
 RecursiveChildrenListManager (Class beanClass, int children, int childrenPerParent)
Comparator getComparator ()
void initChildrenList (NodeList nodeList)

Private Member Functions

Object createBean (String args)

Static Private Member Functions

Constructor getConstructor (Class clazz)

Private Attributes

int count = 0
final int children
final int childrenPerParent
final Class beanClass
final Constructor beanConstructor

Static Private Attributes

final int DEFAULT_CHILDREN = 10
final int DEFAULT_CHILDREN_PER_PARENT = 3
final Class DEFAULT_BEAN_CLASS = SimpleDemoBean.class

Detailed Description

an implementation of the ChildrenListManager to be used for testing and quick hacks. It recursively adds children of the same type to the parent, up to the number of children specified. This class is typically used in the following way:
     GPNode root = NodeFactory.createNode(new SimpleDemoBean("parent"), new RecursiveChildrenListManager(10, 3));
     expl = new TreeExplorer();
     expl.setRootNode(root);
 
This creates a tree, in which you can expand 10 parent nodes
Author:
Vito Baggiolini
Version:
Revision
1.2
Date
2006/09/25 08:52:36


Constructor & Destructor Documentation

cern::gp::explorer::test::helpers::RecursiveChildrenListManager::RecursiveChildrenListManager  )  [inline]
 

Constructor to create a tree with a pre-defined number of children. This constructor uses SimpleDemoBean as Beans to display in the tree. If you need to change the default settings use a different constructor.

cern::gp::explorer::test::helpers::RecursiveChildrenListManager::RecursiveChildrenListManager int  children  )  [inline]
 

constructor that allows to specify how many times children are added to the parents, when the user opens the branches of the tree. After this number has been reached, no further children will be added to the parent, trying to open further branch of the tree will simply result in leaf nodes.

Parameters:
children how many times children shall be added

cern::gp::explorer::test::helpers::RecursiveChildrenListManager::RecursiveChildrenListManager int  children,
int  childrenPerParent
[inline]
 

Constructor that allows to specify (1) how many times children are added to parents when the user opens the branches of the tree and (2) how many children are added to each parent.

Parameters:
children how many times children shall be added
childrenPerParent how many children shall be added to each parent

cern::gp::explorer::test::helpers::RecursiveChildrenListManager::RecursiveChildrenListManager Class  beanClass,
int  children,
int  childrenPerParent
[inline]
 

constructor that allows to specify how many times children are added to the parents, and how many sibling children are added each time, and the Bean class to use

Parameters:
beanClass the class to use as bean. This class should either have a constructor that accepts a String (preferred) or at least a no-argument constructor.
children the number of times children shall be added
the number of sibling children added to each parent


Member Function Documentation

Object cern::gp::explorer::test::helpers::RecursiveChildrenListManager::createBean String  args  )  [inline, private]
 

helper method, uses the variable beanConstructor to create a new Bean

Comparator cern::gp::explorer::test::helpers::RecursiveChildrenListManager::getComparator  )  [inline]
 

Constructor cern::gp::explorer::test::helpers::RecursiveChildrenListManager::getConstructor Class  clazz  )  [inline, static, private]
 

helper method, tries to find a suitable constructor from the class specified Currently, this must either be a constructor that accepts one string or a no-argument constructor.

void cern::gp::explorer::test::helpers::RecursiveChildrenListManager::initChildrenList NodeList  nodeList  )  [inline]
 


Member Data Documentation

final Class cern::gp::explorer::test::helpers::RecursiveChildrenListManager::beanClass [private]
 

final Constructor cern::gp::explorer::test::helpers::RecursiveChildrenListManager::beanConstructor [private]
 

final int cern::gp::explorer::test::helpers::RecursiveChildrenListManager::children [private]
 

final int cern::gp::explorer::test::helpers::RecursiveChildrenListManager::childrenPerParent [private]
 

int cern::gp::explorer::test::helpers::RecursiveChildrenListManager::count = 0 [private]
 

final Class cern::gp::explorer::test::helpers::RecursiveChildrenListManager::DEFAULT_BEAN_CLASS = SimpleDemoBean.class [static, private]
 

final int cern::gp::explorer::test::helpers::RecursiveChildrenListManager::DEFAULT_CHILDREN = 10 [static, private]
 

final int cern::gp::explorer::test::helpers::RecursiveChildrenListManager::DEFAULT_CHILDREN_PER_PARENT = 3 [static, private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:08:31 2009 for ACS Java API by doxygen 1.3.8