Search in sources :

Example 1 with EscherShapePathProperty

use of org.apache.poi.ddf.EscherShapePathProperty in project poi by apache.

the class HSSFSimpleShape method createSpContainer.

@Override
protected EscherContainerRecord createSpContainer() {
    EscherContainerRecord spContainer = new EscherContainerRecord();
    spContainer.setRecordId(EscherContainerRecord.SP_CONTAINER);
    spContainer.setOptions((short) 0x000F);
    EscherSpRecord sp = new EscherSpRecord();
    sp.setRecordId(EscherSpRecord.RECORD_ID);
    sp.setFlags(EscherSpRecord.FLAG_HAVEANCHOR | EscherSpRecord.FLAG_HASSHAPETYPE);
    sp.setVersion((short) 0x2);
    EscherClientDataRecord clientData = new EscherClientDataRecord();
    clientData.setRecordId(EscherClientDataRecord.RECORD_ID);
    clientData.setOptions((short) (0x0000));
    EscherOptRecord optRecord = new EscherOptRecord();
    optRecord.setEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINEDASHING, LINESTYLE_SOLID));
    optRecord.setEscherProperty(new EscherBoolProperty(EscherProperties.LINESTYLE__NOLINEDRAWDASH, 0x00080008));
    //        optRecord.setEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__LINEWIDTH, LINEWIDTH_DEFAULT));
    optRecord.setEscherProperty(new EscherRGBProperty(EscherProperties.FILL__FILLCOLOR, FILL__FILLCOLOR_DEFAULT));
    optRecord.setEscherProperty(new EscherRGBProperty(EscherProperties.LINESTYLE__COLOR, LINESTYLE__COLOR_DEFAULT));
    optRecord.setEscherProperty(new EscherBoolProperty(EscherProperties.FILL__NOFILLHITTEST, NO_FILLHITTEST_FALSE));
    optRecord.setEscherProperty(new EscherBoolProperty(EscherProperties.LINESTYLE__NOLINEDRAWDASH, 0x00080008));
    optRecord.setEscherProperty(new EscherShapePathProperty(EscherProperties.GEOMETRY__SHAPEPATH, EscherShapePathProperty.COMPLEX));
    optRecord.setEscherProperty(new EscherBoolProperty(EscherProperties.GROUPSHAPE__PRINT, 0x080000));
    optRecord.setRecordId(EscherOptRecord.RECORD_ID);
    EscherTextboxRecord escherTextbox = new EscherTextboxRecord();
    escherTextbox.setRecordId(EscherTextboxRecord.RECORD_ID);
    escherTextbox.setOptions((short) 0x0000);
    spContainer.addChildRecord(sp);
    spContainer.addChildRecord(optRecord);
    spContainer.addChildRecord(getAnchor().getEscherAnchor());
    spContainer.addChildRecord(clientData);
    spContainer.addChildRecord(escherTextbox);
    return spContainer;
}
Also used : EscherBoolProperty(org.apache.poi.ddf.EscherBoolProperty) EscherSimpleProperty(org.apache.poi.ddf.EscherSimpleProperty) EscherSpRecord(org.apache.poi.ddf.EscherSpRecord) EscherTextboxRecord(org.apache.poi.ddf.EscherTextboxRecord) EscherClientDataRecord(org.apache.poi.ddf.EscherClientDataRecord) EscherContainerRecord(org.apache.poi.ddf.EscherContainerRecord) EscherShapePathProperty(org.apache.poi.ddf.EscherShapePathProperty) EscherOptRecord(org.apache.poi.ddf.EscherOptRecord) EscherRGBProperty(org.apache.poi.ddf.EscherRGBProperty)

Aggregations

EscherBoolProperty (org.apache.poi.ddf.EscherBoolProperty)1 EscherClientDataRecord (org.apache.poi.ddf.EscherClientDataRecord)1 EscherContainerRecord (org.apache.poi.ddf.EscherContainerRecord)1 EscherOptRecord (org.apache.poi.ddf.EscherOptRecord)1 EscherRGBProperty (org.apache.poi.ddf.EscherRGBProperty)1 EscherShapePathProperty (org.apache.poi.ddf.EscherShapePathProperty)1 EscherSimpleProperty (org.apache.poi.ddf.EscherSimpleProperty)1 EscherSpRecord (org.apache.poi.ddf.EscherSpRecord)1 EscherTextboxRecord (org.apache.poi.ddf.EscherTextboxRecord)1