SortedSet names = new TreeSet(props); for (Iterator i = names.iterator(); i.hasNext(); ) { CompositeName name = (CompositeName) i.next(); addPropertyName(name);
int i = 0; while (i < components.size()) { BaseComponent component = (BaseComponent)components.get(i); PropertyTreeNode parentNode = (PropertyTreeNode)componentToNode.get(component); int nChildren = component.getChildCount(); for (int j = 0; j < nChildren; j++) { BaseComponent childComponent = component.getChild(j); PropertyTreeNode node = new PropertyTreeNode(childComponent.getFullName()); model.insertNodeInto(node, parentNode, parentNode.getChildCount()); componentToNode.put(childComponent, node); nodeToComponent.put(node, childComponent); components.add(childComponent); } i++;
  private DefaultMutableTreeNode makeTree() {    List props = new ArrayList();    // FIXME: This will have trouble if there are more than one property    // with the same name    for (int i = 0; i < compsToConfig.length; i++) {      props.addAll(compsToConfig[i].getPropertyNamesList());    }    //    SortedSet names = new TreeSet(componentToConfigure.getPropertyNamesList());    SortedSet names = new TreeSet(props);    for (Iterator i = names.iterator(); i.hasNext(); ) {      CompositeName name = (CompositeName) i.next();      addPropertyName(name);    }    return root;  }