コード例 #1
0
 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();
   }
 }
コード例 #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);
    }
  }
コード例 #3
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());
 }
コード例 #4
0
ファイル: ArrowTip.java プロジェクト: mmohan01/MultiRefactor
 /** Reads the arrow tip from a StorableInput. */
 public void read(StorableInput dr) throws IOException {
   setAngle(dr.readDouble());
   setOuterRadius(dr.readDouble());
   setInnerRadius(dr.readDouble());
   super.read(dr);
 }