/** * Create a new TextBox. This constructor is used when a new shape is created. * * @param parent the parent of this Shape. For example, if this text box is a cell * in a table then the parent is Table. */ public TextShape(Shape parent){ super(null, parent); _escherContainer = createSpContainer(parent instanceof ShapeGroup); }
protected EscherContainerRecord createSpContainer(int shapeType, boolean isChild){ _escherContainer = super.createSpContainer(isChild); setShapeType(shapeType); //set default properties for an autoshape setEscherProperty(EscherProperties.PROTECTION__LOCKAGAINSTGROUPING, 0x40000); setEscherProperty(EscherProperties.FILL__FILLCOLOR, 0x8000004); setEscherProperty(EscherProperties.FILL__FILLCOLOR, 0x8000004); setEscherProperty(EscherProperties.FILL__FILLBACKCOLOR, 0x8000000); setEscherProperty(EscherProperties.FILL__NOFILLHITTEST, 0x100010); setEscherProperty(EscherProperties.LINESTYLE__COLOR, 0x8000001); setEscherProperty(EscherProperties.LINESTYLE__NOLINEDRAWDASH, 0x80008); setEscherProperty(EscherProperties.SHADOWSTYLE__COLOR, 0x8000002); return _escherContainer; }
/** * Create a new TextBox and initialize its internal structures * * @return the created <code>EscherContainerRecord</code> which holds shape data */ protected EscherContainerRecord createSpContainer(boolean isChild){ _escherContainer = super.createSpContainer(isChild); setShapeType(ShapeTypes.TextBox); //set default properties for a TextBox setEscherProperty(EscherProperties.FILL__FILLCOLOR, 0x8000004); setEscherProperty(EscherProperties.FILL__FILLBACKCOLOR, 0x8000000); setEscherProperty(EscherProperties.FILL__NOFILLHITTEST, 0x100000); setEscherProperty(EscherProperties.LINESTYLE__COLOR, 0x8000001); setEscherProperty(EscherProperties.LINESTYLE__NOLINEDRAWDASH, 0x80000); setEscherProperty(EscherProperties.SHADOWSTYLE__COLOR, 0x8000002); _txtrun = createTextRun(); return _escherContainer; }