/** * 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; }
spContainer.add(sp); Opt opt = new Opt(); opt.addProperty(344, false, false, 0); // ? opt.addProperty(387, false, false, 134217808); // background colour opt.addProperty(959, false, false, 131074); // hide spContainer.add(opt); 0x1); spContainer.add(clientAnchor); spContainer.add(clientData); spContainer.add(clientTextBox);
/** * Gets hold of the BStore container from the Escher data * * @return the BStore container */ private BStoreContainer getBStoreContainer() { if (bstoreContainer == null) { if (!initialized) { initialize(); } EscherRecord[] children = escherData.getChildren(); if (children.length > 1 && children[1].getType() == EscherRecordType.BSTORE_CONTAINER) { bstoreContainer = (BStoreContainer) children[1]; } } return bstoreContainer; }
Assert.verify(er.isContainer()); EscherContainer dgContainer = new EscherContainer(er); EscherRecord[] children = dgContainer.getChildren(); children = dgContainer.getChildren(); EscherRecord[] spgrChildren = spgrContainer.getChildren();
int curpos = getPos() + HEADER_LENGTH; int endpos = Math.min(getPos() + getLength(), getStreamLength()); EscherRecordData erd = new EscherRecordData(getEscherStream(), curpos);
length += spContainers[i].getLength(); length += spContainers[i + numDrawings].getLength(); byte[] bytes = spContainers[i].getBytes(); byte[] bytes2 = spContainers[i].setHeaderData(bytes);
byte[] data = spc.getData(); spContainerData[i] = data; byte[] data = spContainer.getBytes(); //use getBytes instead of getData data = spContainer.setHeaderData(data); spContainerData[i + numImages] = data;
/** * Display the formatted escher stream * * @exception IOException */ public void display() throws IOException { EscherRecordData er = new EscherRecordData(stream, 0); EscherContainer ec = new EscherContainer(er); displayContainer(ec, 0); }
int curpos = getPos() + HEADER_LENGTH; int endpos = Math.min(getPos() + getLength(), getStreamLength()); EscherRecordData erd = new EscherRecordData(getEscherStream(), curpos);
length += spContainers[i].getLength(); length += spContainers[i + numDrawings].getLength(); byte[] bytes = spContainers[i].getBytes(); byte[] bytes2 = spContainers[i].setHeaderData(bytes);
byte[] data = spc.getData(); spContainerData[i] = data; byte[] data = spContainer.getBytes(); //use getBytes instead of getData data = spContainer.setHeaderData(data); spContainerData[i + numImages] = data;
Assert.verify(er.isContainer()); EscherContainer dgContainer = new EscherContainer(er); EscherRecord[] children = dgContainer.getChildren(); children = dgContainer.getChildren(); EscherRecord[] spgrChildren = spgrContainer.getChildren();
/** * Display the formatted escher stream * * @exception IOException */ public void display() throws IOException { EscherRecordData er = new EscherRecordData(stream, 0); EscherContainer ec = new EscherContainer(er); displayContainer(ec, 0); }
/** * Gets hold of the BStore container from the Escher data * * @return the BStore container */ private BStoreContainer getBStoreContainer() { if (bstoreContainer == null) { if (!initialized) { initialize(); } EscherRecord[] children = escherData.getChildren(); if (children.length > 1 && children[1].getType() == EscherRecordType.BSTORE_CONTAINER) { bstoreContainer = (BStoreContainer) children[1]; } } return bstoreContainer; }
/** * 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; }
spContainer.add(sp); Opt opt = new Opt(); opt.addProperty(344, false, false, 0); // ? opt.addProperty(387, false, false, 134217808); // background colour opt.addProperty(959, false, false, 131074); // hide spContainer.add(opt); 0x1); spContainer.add(clientAnchor); spContainer.add(clientData); spContainer.add(clientTextBox);
/** * Gets the sp container from the internal data * * @param spgrContainer the spgr container * @param sps the list of sp records */ private void getSpContainers(EscherContainer spgrContainer, ArrayList sps) { EscherRecord[] spgrChildren = spgrContainer.getChildren(); for (int i = 0; i < spgrChildren.length; i++) { if (spgrChildren[i].getType() == EscherRecordType.SP_CONTAINER) { sps.add(spgrChildren[i]); } else if (spgrChildren[i].getType() == EscherRecordType.SPGR_CONTAINER) { getSpContainers((EscherContainer) spgrChildren[i], sps); } else { logger.warn("Spgr Containers contains a record other than Sp/Spgr " + "containers"); } } }
/** * Gets the sp container from the internal data * * @param spgrContainer the spgr container * @param sps the list of sp records */ private void getSpContainers(EscherContainer spgrContainer, ArrayList sps) { EscherRecord[] spgrChildren = spgrContainer.getChildren(); for (int i = 0; i < spgrChildren.length; i++) { if (spgrChildren[i].getType() == EscherRecordType.SP_CONTAINER) { sps.add(spgrChildren[i]); } else if (spgrChildren[i].getType() == EscherRecordType.SPGR_CONTAINER) { getSpContainers((EscherContainer) spgrChildren[i], sps); } else { logger.warn("Spgr Containers contains a record other than Sp/Spgr " + "containers"); } } }
/** * 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); } } }