/** Creates a new, empty wrapper for DDF Escher Records and their children */
  public EscherTextboxWrapper() {
    _escherRecord = new EscherTextboxRecord();
    _escherRecord.setRecordId(EscherTextboxRecord.RECORD_ID);
    _escherRecord.setOptions((short) 15);

    _children = new Record[0];
  }
  /** Creates the wrapper for the given DDF Escher Record and children */
  public EscherTextboxWrapper(EscherTextboxRecord textbox) {
    _escherRecord = textbox;
    _type = (long) _escherRecord.getRecordId();

    // Find the child records in the escher data
    byte[] data = _escherRecord.getData();
    _children = Record.findChildRecords(data, 0, data.length);
  }
  /**
   * Stores the data for the child records back into the Escher layer. Doesn't actually do the
   * writing out, that's left to the Escher layer to do. Must be called before writeOut/serialize is
   * called on the underlying Escher object!
   */
  public void writeOut(OutputStream out) throws IOException {
    // Write out our children, and stuff them into the Escher layer

    // Grab the children's data
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    for (int i = 0; i < _children.length; i++) {
      _children[i].writeOut(baos);
    }
    byte[] data = baos.toByteArray();

    // Save in the escher layer
    _escherRecord.setData(data);
  }