private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {

    s.defaultReadObject();

    fSelection = CollectionsFactory.current().createList(); // could use lazy initialization instead
    if (drawing() != null) {
      drawing().addDrawingChangeListener(this);
    }
    fSelectionListeners = CollectionsFactory.current().createList();
  }
Exemplo n.º 2
0
  private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {

    s.defaultReadObject();

    FigureEnumeration k = figures();
    while (k.hasMoreElements()) {
      Figure figure = k.nextFigure();
      figure.addToContainer(this);
    }
  }