private void buildBranch(Object parent,int depth,Container destination){
  Vector children=model.getChildren(parent);
  int size=children.size();
  Integer depthVal=new Integer(depth + 1);
  for (int iter=0; iter < size; iter++) {
    final Object current=children.elementAt(iter);
    Component nodeComponent=createNode(current,depth);
    if (model.isLeaf(current)) {
      destination.addComponent(nodeComponent);
      bindNodeListener(new Handler(current),nodeComponent);
    }
 else {
      Container componentArea=new Container(new BorderLayout());
      componentArea.addComponent(BorderLayout.NORTH,nodeComponent);
      destination.addComponent(componentArea);
      bindNodeListener(expansionListener,nodeComponent);
    }
    nodeComponent.putClientProperty(KEY_OBJECT,current);
    nodeComponent.putClientProperty(KEY_PARENT,parent);
    nodeComponent.putClientProperty(KEY_DEPTH,depthVal);
  }
}

private void buildBranch ( Object parent , int depth , Container destination ) { Vector children = model . getChildren ( parent ) ; int size = children . size ( ) ; Integer depthVal = new Integer ( depth + 1 ) ; for ( int iter = 0 ; iter < size ; iter ++ ) { final Object current = children . elementAt ( iter ) ; Component nodeComponent = createNode ( current , depth ) ; if ( model . isLeaf ( current ) ) { destination . addComponent ( nodeComponent ) ; bindNodeListener ( new Handler ( current ) , nodeComponent ) ; } else { Container componentArea = new Container ( new BorderLayout ( ) ) ; componentArea . addComponent ( BorderLayout . NORTH , nodeComponent ) ; destination . addComponent ( componentArea ) ; bindNodeListener ( expansionListener , nodeComponent ) ; } nodeComponent . putClientProperty ( KEY_OBJECT , current ) ; nodeComponent . putClientProperty ( KEY_PARENT , parent ) ; nodeComponent . putClientProperty ( KEY_DEPTH , depthVal ) ; } }
adds the child components of a tree branch to the given container .
