コード例 #1
0
 /** Releases the figure and all its children. */
 public void release() {
   super.release();
   FigureEnumeration k = figures();
   while (k.hasMoreElements()) {
     Figure figure = k.nextFigure();
     figure.release();
   }
 }
コード例 #2
0
 /** Since this is an add operation, figures can only be released if it has been undone. */
 public void release() {
   if (undone == true) {
     FigureEnumeration fe = getAffectedFigures();
     while (fe.hasNextFigure()) {
       Figure f = fe.nextFigure();
       getDrawingView().drawing().remove(f);
       f.release();
     }
   }
   setAffectedFigures(CH.ifa.draw.standard.FigureEnumerator.getEmptyEnumeration());
 }