FramePredicate fp = getFramePredicate();  org.cougaar.core.qos.frame.Frame  f2, f = getFrame(); if (f != null) { String frameName = (String) f.getValue("name"); Collection childFrames = frameHelper.getAllChildren(f, (fp!=null?fp.getParentRelationship():"contains"));  org.cougaar.core.qos.frame.Frame fr; for (Iterator ii=childFrames.iterator(); ii.hasNext(); ) { fr = (org.cougaar.core.qos.frame.Frame) ii.next();  if (display.getGraphic(fr) == null) add(fr); }  } else { ShapeGraphic shg; Collection frames; org.cougaar.core.qos.frame.Frame fr; for (Iterator ii=prototypes.values().iterator(); ii.hasNext();) { shg = (ShapeGraphic) ii.next(); FramePredicate pfp = shg.getFramePredicate(); frames = frameHelper.findFrames(pfp); if (frames != null) { for (Iterator jj=frames.iterator(); jj.hasNext();)  { fr = (org.cougaar.core.qos.frame.Frame) jj.next(); if (display.getGraphic(fr) == null) add(fr); } } } }
buildChildren(helper, display);
    public void setFrameHelper(FrameHelper helper, Display display) {        super.setFrameHelper(helper, display);        if (log.isDebugEnabled())            log.debug("setFrameHelper:" +toString());        FramePredicate fp = getFramePredicate();        org.cougaar.core.qos.frame.Frame  f2, f = getFrame();        if (f != null) {            String frameName = (String) f.getValue("name");            Collection childFrames = frameHelper.getAllChildren(f, (fp!=null?fp.getParentRelationship():"contains"));            org.cougaar.core.qos.frame.Frame fr;            for (Iterator ii=childFrames.iterator(); ii.hasNext(); ) {                fr = (org.cougaar.core.qos.frame.Frame) ii.next();                // add if the frame matches any of the prototypes                if (display.getGraphic(fr) == null)                    add(fr);            }        } else {            ShapeGraphic shg;            Collection frames;            org.cougaar.core.qos.frame.Frame fr;            for (Iterator ii=prototypes.values().iterator(); ii.hasNext();) {                shg = (ShapeGraphic) ii.next();                FramePredicate pfp = shg.getFramePredicate();                frames = frameHelper.findFrames(pfp);                if (frames != null) {                    for (Iterator jj=frames.iterator(); jj.hasNext();)  {                        fr = (org.cougaar.core.qos.frame.Frame) jj.next();                        if (display.getGraphic(fr) == null)                            add(fr);                    }                }            }        }        ShapeGraphic ch;        for (Iterator ii=children.iterator(); ii.hasNext();) {            ch=(ShapeGraphic) ii.next();            ch.setFrameHelper(frameHelper, display);        }    }