Search in sources :

Example 11 with EscherOptRecord

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

the class HSSFComment method createSpContainer.

@Override
protected EscherContainerRecord createSpContainer() {
    EscherContainerRecord spContainer = super.createSpContainer();
    EscherOptRecord opt = spContainer.getChildById(EscherOptRecord.RECORD_ID);
    opt.removeEscherProperty(EscherProperties.TEXT__TEXTLEFT);
    opt.removeEscherProperty(EscherProperties.TEXT__TEXTRIGHT);
    opt.removeEscherProperty(EscherProperties.TEXT__TEXTTOP);
    opt.removeEscherProperty(EscherProperties.TEXT__TEXTBOTTOM);
    opt.setEscherProperty(new EscherSimpleProperty(EscherProperties.GROUPSHAPE__PRINT, false, false, GROUP_SHAPE_PROPERTY_DEFAULT_VALUE));
    return spContainer;
}
Also used : EscherSimpleProperty(org.apache.poi.ddf.EscherSimpleProperty) EscherContainerRecord(org.apache.poi.ddf.EscherContainerRecord) EscherOptRecord(org.apache.poi.ddf.EscherOptRecord)

Example 12 with EscherOptRecord

use of org.apache.poi.ddf.EscherOptRecord 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

EscherOptRecord (org.apache.poi.ddf.EscherOptRecord)12 EscherContainerRecord (org.apache.poi.ddf.EscherContainerRecord)10 EscherSimpleProperty (org.apache.poi.ddf.EscherSimpleProperty)5 EscherRecord (org.apache.poi.ddf.EscherRecord)4 EscherSpRecord (org.apache.poi.ddf.EscherSpRecord)4 EscherBoolProperty (org.apache.poi.ddf.EscherBoolProperty)3 EscherComplexProperty (org.apache.poi.ddf.EscherComplexProperty)3 EscherProperty (org.apache.poi.ddf.EscherProperty)3 EscherRGBProperty (org.apache.poi.ddf.EscherRGBProperty)3 EscherClientDataRecord (org.apache.poi.ddf.EscherClientDataRecord)2 EscherDgRecord (org.apache.poi.ddf.EscherDgRecord)2 EscherDggRecord (org.apache.poi.ddf.EscherDggRecord)2 RecordFormatException (org.apache.poi.util.RecordFormatException)2 Map (java.util.Map)1 AbstractEscherOptRecord (org.apache.poi.ddf.AbstractEscherOptRecord)1 EscherBSERecord (org.apache.poi.ddf.EscherBSERecord)1 EscherBlipRecord (org.apache.poi.ddf.EscherBlipRecord)1 EscherChildAnchorRecord (org.apache.poi.ddf.EscherChildAnchorRecord)1 EscherClientAnchorRecord (org.apache.poi.ddf.EscherClientAnchorRecord)1 EscherShapePathProperty (org.apache.poi.ddf.EscherShapePathProperty)1