Package org.apache.poi.ddf

Examples of org.apache.poi.ddf.EscherRecord


            shape,
            drawingManager.allocateShapeId(drawingGroupId) );
        shapeToObj.put( findClientData( shapeModel.getSpContainer() ), shapeModel.getObjRecord() );
        if ( shapeModel instanceof TextboxShape )
        {
          EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
          shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
          //          escherParent.addChildRecord(escherTextbox);

          if ( shapeModel instanceof CommentShape ){
            CommentShape comment = (CommentShape)shapeModel;
View Full Code Here


    EscherContainerRecord spgrContainer = new EscherContainerRecord();
    EscherContainerRecord spContainer = new EscherContainerRecord();
    EscherSpgrRecord spgr = new EscherSpgrRecord();
    EscherSpRecord sp = new EscherSpRecord();
    EscherOptRecord opt = new EscherOptRecord();
    EscherRecord anchor;
    EscherClientDataRecord clientData = new EscherClientDataRecord();

    spgrContainer.setRecordId( EscherContainerRecord.SPGR_CONTAINER );
    spgrContainer.setOptions( (short) 0x000F );
    spContainer.setRecordId( EscherContainerRecord.SP_CONTAINER );
View Full Code Here

  }

  private EscherRecord findClientData( EscherContainerRecord spContainer )
  {
    for (Iterator<EscherRecord> iterator = spContainer.getChildIterator(); iterator.hasNext();) {
      EscherRecord r = iterator.next();
      if (r.getRecordId() == EscherClientDataRecord.RECORD_ID) {
        return r;
      }
    }
    throw new IllegalArgumentException( "Can not find client data record" );
  }
View Full Code Here

      int recordId)
  {
    for (Iterator iterator = owner.getChildRecords().iterator(); iterator
        .hasNext();)
    {
      EscherRecord escherRecord = (EscherRecord) iterator.next();
      if (escherRecord.getRecordId() == recordId)
        return escherRecord;
    }
    return null;
  }
View Full Code Here

            dgg.addCluster( dgId, 0 );
            dgg.setDrawingsSaved(dgg.getDrawingsSaved() + 1);

            EscherDgRecord dg = null;
            for(Iterator<EscherRecord> it = escherContainer.getChildIterator(); it.hasNext();) {
                EscherRecord er = it.next();
                if(er instanceof EscherDgRecord) {
                    dg = (EscherDgRecord)er;
                    //update id of the drawing in the cloned sheet
                    dg.setOptions( (short) ( dgId << 4 ) );
                } else if (er instanceof EscherContainerRecord){
View Full Code Here

        EscherAggregate r = (EscherAggregate) getSheet().findFirstRecordBySid(EscherAggregate.sid);
        List<EscherRecord> escherRecords = r.getEscherRecords();
        PrintWriter w = new PrintWriter(System.out);
        for (Iterator<EscherRecord> iterator = escherRecords.iterator(); iterator.hasNext();) {
            EscherRecord escherRecord = iterator.next();
            if (fat) {
                System.out.println(escherRecord.toString());
            } else {
                escherRecord.display(w, 0);
            }
        }
        w.flush();
    }
View Full Code Here

         escherRecords.clear();
        EscherRecordFactory recordFactory = new DefaultEscherRecordFactory();
        int pos = offset;
        while ( pos < offset + size )
        {
            EscherRecord r = recordFactory.createRecord(data, pos);
            int bytesRead = r.fillFields(data, pos, recordFactory );
            escherRecords.add(r);
            pos += bytesRead;
        }
    }
View Full Code Here

        buffer.append('[' + getRecordName() + ']' + nl);
        if (escherRecords.size() == 0)
            buffer.append("No Escher Records Decoded" + nl);
        for ( Iterator<EscherRecord> iterator = escherRecords.iterator(); iterator.hasNext(); )
        {
            EscherRecord r = iterator.next();
            buffer.append(r.toString());
        }
        buffer.append("[/" + getRecordName() + ']' + nl);

        return buffer.toString();
    }
View Full Code Here

        LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));

        int pos = offset + 4;
        for ( Iterator<EscherRecord> iterator = escherRecords.iterator(); iterator.hasNext(); )
        {
            EscherRecord r = iterator.next();
            pos += r.serialize( pos, data, new NullEscherSerializationListener() );
        }
        return getRecordSize();
    }
View Full Code Here

            return rawData.length;
        }
        int size = 0;
        for ( Iterator<EscherRecord> iterator = escherRecords.iterator(); iterator.hasNext(); )
        {
            EscherRecord r = iterator.next();
            size += r.getRecordSize();
        }
        return size;
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.ddf.EscherRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.