public void read(StorableInput dr) throws IOException {
   super.read(dr);
   Connector start = (Connector) dr.readStorable();
   if (start != null) {
     connectStart(start);
   }
   Connector end = (Connector) dr.readStorable();
   if (end != null) {
     connectEnd(end);
   }
   if ((start != null) && (end != null)) {
     updateConnection();
   }
 }
Beispiel #2
0
 private void readFromStorableInput(String filename) {
   try {
     URL url = new URL(getCodeBase(), filename);
     InputStream stream = url.openStream();
     StorableInput input = new StorableInput(stream);
     fDrawing.release();
     fDrawing = (Drawing) input.readStorable();
     view().setDrawing(fDrawing);
   } catch (IOException e) {
     initDrawing();
     showStatus("Error:" + e);
   } catch (org.aspectj.lang.SoftException e) {
     showStatus("Error: " + e.getWrappedThrowable());
   }
 }