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); } }
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(); } }
/** 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()); }
public void read(StorableInput dr) throws IOException { super.read(dr); fRelativeX = dr.readDouble(); fRelativeY = dr.readDouble(); }
public void read(StorableInput dr) throws IOException { super.read(dr); fDisplayBox = new Rectangle(dr.readInt(), dr.readInt(), dr.readInt(), dr.readInt()); fArcWidth = dr.readInt(); fArcHeight = dr.readInt(); }
/** Reads the arrow tip from a StorableInput. */ public void read(StorableInput dr) throws IOException { super.read(dr); fLocator = (Locator) dr.readStorable(); }
/** 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); }