AutoShapepublic class AutoShape extends SimpleShape Represents a autoshape in a PowerPoint drawing |
Constructors Summary |
---|
protected AutoShape(EscherContainerRecord escherRecord, Shape parent)
super(escherRecord, parent);
| public AutoShape(int type, Shape parent)
super(null, parent);
_escherContainer = createSpContainer(type, parent instanceof ShapeGroup);
| public AutoShape(int type)
this(type, null);
|
Methods Summary |
---|
protected org.apache.poi.ddf.EscherContainerRecord | createSpContainer(int shapeType, boolean isChild)
EscherContainerRecord spcont = super.createSpContainer(isChild);
EscherSpRecord spRecord = spcont.getChildById(EscherSpRecord.RECORD_ID);
short type = (short)((shapeType << 4) | 0x2);
spRecord.setOptions(type);
//set default properties for an autoshape
EscherOptRecord opt = (EscherOptRecord)getEscherChild(spcont, EscherOptRecord.RECORD_ID);
opt.addEscherProperty(new EscherSimpleProperty(EscherProperties.FILL__FILLCOLOR, 0x8000004));
opt.addEscherProperty(new EscherSimpleProperty(EscherProperties.FILL__FILLBACKCOLOR, 0x8000000));
opt.addEscherProperty(new EscherSimpleProperty(EscherProperties.FILL__NOFILLHITTEST, 0x100010));
opt.addEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__COLOR, 0x8000001));
opt.addEscherProperty(new EscherSimpleProperty(EscherProperties.LINESTYLE__NOLINEDRAWDASH, 0x80008));
opt.addEscherProperty(new EscherSimpleProperty(EscherProperties.SHADOWSTYLE__COLOR, 0x8000002));
return spcont;
|
|