コード例 #1
0
ファイル: DrawingGroup.java プロジェクト: enenuki/phd
 /* 175:    */
 /* 176:    */ private void initialize() /* 177:    */ {
   /* 178:351 */ EscherRecordData er = new EscherRecordData(this, 0);
   /* 179:    */
   /* 180:353 */ Assert.verify(er.isContainer());
   /* 181:    */
   /* 182:355 */ this.escherData = new EscherContainer(er);
   /* 183:    */
   /* 184:357 */ Assert.verify(this.escherData.getLength() == this.drawingData.length);
   /* 185:358 */ Assert.verify(this.escherData.getType() == EscherRecordType.DGG_CONTAINER);
   /* 186:    */
   /* 187:360 */ this.initialized = true;
   /* 188:    */ }
コード例 #2
0
  /** Initialization */
  private void initialize() {
    int curpos = getPos() + HEADER_LENGTH;
    int endpos = Math.min(getPos() + getLength(), getStreamLength());

    EscherRecord newRecord = null;

    while (curpos < endpos) {
      EscherRecordData erd = new EscherRecordData(getEscherStream(), curpos);

      EscherRecordType type = erd.getType();
      if (type == EscherRecordType.DGG) {
        newRecord = new Dgg(erd);
      } else if (type == EscherRecordType.DG) {
        newRecord = new Dg(erd);
      } else if (type == EscherRecordType.BSTORE_CONTAINER) {
        newRecord = new BStoreContainer(erd);
      } else if (type == EscherRecordType.SPGR_CONTAINER) {
        newRecord = new SpgrContainer(erd);
      } else if (type == EscherRecordType.SP_CONTAINER) {
        newRecord = new SpContainer(erd);
      } else if (type == EscherRecordType.SPGR) {
        newRecord = new Spgr(erd);
      } else if (type == EscherRecordType.SP) {
        newRecord = new Sp(erd);
      } else if (type == EscherRecordType.CLIENT_ANCHOR) {
        newRecord = new ClientAnchor(erd);
      } else if (type == EscherRecordType.CLIENT_DATA) {
        newRecord = new ClientData(erd);
      } else if (type == EscherRecordType.BSE) {
        newRecord = new BlipStoreEntry(erd);
      } else if (type == EscherRecordType.OPT) {
        newRecord = new Opt(erd);
      } else if (type == EscherRecordType.SPLIT_MENU_COLORS) {
        newRecord = new SplitMenuColors(erd);
      } else if (type == EscherRecordType.CLIENT_TEXT_BOX) {
        newRecord = new ClientTextBox(erd);
      } else {
        newRecord = new EscherAtom(erd);
      }

      children.add(newRecord);
      curpos += newRecord.getLength();
    }

    initialized = true;
  }