if (selectedShape instanceof ShapeContainer) { String childString=""; ShapeGraphic ch; for (Iterator ii=((ShapeContainer)selectedShape).getChildren().iterator(); ii.hasNext();) { ch = (ShapeGraphic)ii.next(); childString=childString+ ", "+ch.getId(); } if (log.isDebugEnabled()) log.debug("------>children:"+childString); childString = ""; for (Iterator ii=((ShapeContainer)selectedShape).getPrototypes().iterator(); ii.hasNext();) { ch = (ShapeGraphic) ii.next(); childString=childString+ ", "+ch.getId(); } if (log.isDebugEnabled()) log.debug("------>prototypes:"+childString);
selectedShape.setSelected(true);
    public void mousePressed(MouseEvent evt) {        //System.out.println("AnimatedCanvas.mousePressed");        if(mouseMoveFlag==false) {          // start drag          mouseMoveFlag=true;          mousePoint=evt.getPoint();          mouseStartDragPoint = mousePoint;          if (selectedShape != null)              selectedShape.setSelected(false);          selectedShape = findShape(mousePoint.x,  mousePoint.y);          if (selectedShape != null)  {              if (log.isDebugEnabled())                log.debug("selecting = "+selectedShape);            if (selectedShape instanceof ShapeContainer) {              String childString="";              ShapeGraphic ch;              for (Iterator ii=((ShapeContainer)selectedShape).getChildren().iterator(); ii.hasNext();) {                  ch = (ShapeGraphic)ii.next();                  childString=childString+ ", "+ch.getId();              }              if (log.isDebugEnabled())                log.debug("------>children:"+childString);	      childString = "";	      for (Iterator ii=((ShapeContainer)selectedShape).getPrototypes().iterator(); ii.hasNext();) {		  ch = (ShapeGraphic) ii.next();		  childString=childString+ ", "+ch.getId();	      }	      if (log.isDebugEnabled())                log.debug("------>prototypes:"+childString);            }            selectedShape.setSelected(true);          }        }    }