Пример #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
 /** Reads the contained figures from StorableInput. */
 public void read(StorableInput dr) throws IOException {
   super.read(dr);
   int size = dr.readInt();
   fFigures = new Vector(size);
   for (int i = 0; i < size; i++) add((Figure) dr.readStorable());
 }
Пример #3
0
 /** Writes the contained figures to the StorableOutput. */
 public void write(StorableOutput dw) {
   super.write(dw);
   dw.writeInt(fFigures.size());
   Enumeration k = fFigures.elements();
   while (k.hasMoreElements()) dw.writeStorable((Storable) k.nextElement());
 }