for (Iterator ii=sc.getPrototypes().iterator(); ii.hasNext();) { g = (ShapeGraphic) ii.next(); buildTree(newNode, g);
if (showPrototypes) { for (Iterator ii=sc.getPrototypes().iterator(); ii.hasNext();) { g = (ShapeGraphic) ii.next(); buildTree(newNode, g); }
    public DefaultMutableTreeNode buildTree(ShapeGraphicNode parent, Object userObject) {        ShapeGraphicNode newNode = null;        if (userObject instanceof ShapeGraphic) {            ShapeGraphic graphic = (ShapeGraphic)userObject;            newNode = (ShapeGraphicNode) createNode(graphic);            if (parent != null && !parent.hasChild(newNode))                treeModel.insertNodeInto(newNode, parent, 0);            if (graphic.hasFrame()) {                DefaultMutableTreeNode fnode = createNode(graphic.getFrame());                if (!newNode.hasChild(fnode))                    treeModel.insertNodeInto(fnode, newNode, 0);            }            if (graphic.isContainer()) {                ShapeContainer sc = (ShapeContainer) graphic;                ShapeGraphic g;                for (Iterator ii=sc.getPrototypes().iterator(); ii.hasNext();) {                    g = (ShapeGraphic) ii.next();                    buildTree(newNode, g);                }                for (Iterator ii=sc.getChildren().iterator(); ii.hasNext();) {                    g = (ShapeGraphic) ii.next();                    buildTree(newNode, g);                }            }        }  /*else if (userObject instanceof org.cougaar.core.qos.frame.Frame) {            org.cougaar.core.qos.frame.Frame frame = (org.cougaar.core.qos.frame.Frame)userObject;            newNode = createNode(frame);        } */        //if (parent != null && newNode != null)        //    parent.add(newNode);        return newNode;    }