/** * Initializes the drawing data from the escher record read in */ private void initialize() { EscherRecordData er = new EscherRecordData(this, 0); Assert.verify(er.isContainer()); escherData = new EscherContainer(er); Assert.verify(escherData.getLength() == drawingData.length); Assert.verify(escherData.getType() == EscherRecordType.DGG_CONTAINER); initialized = true; }
/** * Initializes the drawing data from the escher record read in */ private void initialize() { EscherRecordData er = new EscherRecordData(this, 0); Assert.verify(er.isContainer()); escherData = new EscherContainer(er); Assert.verify(escherData.getLength() == drawingData.length); Assert.verify(escherData.getType() == EscherRecordType.DGG_CONTAINER); initialized = true; }
/** * Displays the escher container as text * * @param ec the escher container * @param level the indent level * @exception IOException */ private void displayContainer(EscherContainer ec, int level) throws IOException { displayRecord(ec, level); // Display the contents of the container level++; EscherRecord[] children = ec.getChildren(); for (int i = 0; i < children.length; i++) { EscherRecord er = children[i]; if (er.getEscherData().isContainer()) { displayContainer((EscherContainer) er, level); } else { displayRecord(er, level); } } }
/** * Displays the escher container as text * * @param ec the escher container * @param level the indent level * @exception IOException */ private void displayContainer(EscherContainer ec, int level) throws IOException { displayRecord(ec, level); // Display the contents of the container level++; EscherRecord[] children = ec.getChildren(); for (int i = 0; i < children.length; i++) { EscherRecord er = children[i]; if (er.getEscherData().isContainer()) { displayContainer((EscherContainer) er, level); } else { displayRecord(er, level); } } }
Assert.verify(er.isContainer());
Assert.verify(er.isContainer());