Top Description Fields Constructors Methods
org.apache.poi.hssf.usermodel

public Class HSSFSimpleShape

extends HSSFShape
implements SimpleShape
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.usermodel.SimpleShape, org.apache.poi.ss.usermodel.Shape
Known Direct Subclasses
org.apache.poi.hssf.usermodel.HSSFTextbox, org.apache.poi.hssf.usermodel.HSSFCombobox, org.apache.poi.hssf.usermodel.HSSFPicture, org.apache.poi.hssf.usermodel.HSSFPolygon
Static Imports
org.apache.poi.hssf.record.TextObjectRecord.HORIZONTAL_TEXT_ALIGNMENT_CENTERED, .TextObjectRecord.VERTICAL_TEXT_ALIGNMENT_CENTER

Represents a simple shape such as a line, rectangle or oval.

Field Summary

Modifier and TypeField and Description
private TextObjectRecord
public static final short
public static final short
public static final short
public static final short
public static final short
public static final short
public static final short
public static final short
public static final int
public static final int
public static final int
Inherited from org.apache.poi.hssf.usermodel.HSSFShape:
anchorFILL__FILLCOLOR_DEFAULTLINESTYLE__COLOR_DEFAULTLINESTYLE_DASHDOTDOTSYSLINESTYLE_DASHDOTGELLINESTYLE_DASHDOTSYSLINESTYLE_DASHGELLINESTYLE_DASHSYSLINESTYLE_DEFAULTLINESTYLE_DOTGELLINESTYLE_DOTSYSLINESTYLE_LONGDASHDOTDOTGELLINESTYLE_LONGDASHDOTGELLINESTYLE_LONGDASHGELLINESTYLE_NONELINESTYLE_SOLIDLINEWIDTH_DEFAULTLINEWIDTH_ONE_PTNO_FILL_DEFAULTNO_FILLHITTEST_FALSENO_FILLHITTEST_TRUE

Constructor Summary

AccessConstructor and Description
public
HSSFSimpleShape(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord textObjectRecord)

public
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
protected void
afterRemove(HSSFPatriarch patriarch)

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.afterRemove.

remove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapes

protected HSSFShape
protected ObjRecord
protected EscherContainerRecord
protected TextObjectRecord
private TextObjectRecord
public int
public int

Returns:

One of the OBJECT_TYPE_* constants.
getShapeType
()

Gets the shape type.

public HSSFRichTextString

Returns:

the rich text string for this textbox.
getString
()

protected TextObjectRecord
public int
public void
setShapeType(int
- shapeType
value
)

public void
setString(RichTextString
Sets the rich text string used by this object.
string
)

public void
setWrapText(int value)

Inherited from org.apache.poi.hssf.usermodel.HSSFShape:
countOfAllChildrengetAnchorgetEscherContainergetFillColorgetLineStylegetLineStyleColorgetLineWidthgetObjRecordgetOptRecordgetParentgetPatriarchgetRotationDegreegetShapeNameisFlipHorizontalisFlipVerticalisNoFillsetAnchorsetFillColorsetFillColorsetFlipHorizontalsetFlipVerticalsetLineStylesetLineStyleColorsetLineStyleColorsetLineWidthsetNoFillsetParentsetPatriarchsetPropertyValuesetRotationDegreesetShapeId

Field Detail

_textObjectRecordback to summary
private TextObjectRecord _textObjectRecord
OBJECT_TYPE_ARCback to summary
public static final short OBJECT_TYPE_ARC
OBJECT_TYPE_COMBO_BOXback to summary
public static final short OBJECT_TYPE_COMBO_BOX
OBJECT_TYPE_COMMENTback to summary
public static final short OBJECT_TYPE_COMMENT
OBJECT_TYPE_LINEback to summary
public static final short OBJECT_TYPE_LINE
OBJECT_TYPE_MICROSOFT_OFFICE_DRAWINGback to summary
public static final short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING
OBJECT_TYPE_OVALback to summary
public static final short OBJECT_TYPE_OVAL
OBJECT_TYPE_PICTUREback to summary
public static final short OBJECT_TYPE_PICTURE
OBJECT_TYPE_RECTANGLEback to summary
public static final short OBJECT_TYPE_RECTANGLE
WRAP_BY_POINTSback to summary
public static final int WRAP_BY_POINTS
WRAP_NONEback to summary
public static final int WRAP_NONE
WRAP_SQUAREback to summary
public static final int WRAP_SQUARE

Constructor Detail

HSSFSimpleShapeback to summary
public HSSFSimpleShape(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord textObjectRecord)
HSSFSimpleShapeback to summary
public HSSFSimpleShape(EscherContainerRecord spContainer, ObjRecord objRecord)
HSSFSimpleShapeback to summary
public HSSFSimpleShape(HSSFShape parent, HSSFAnchor anchor)

Method Detail

afterInsertback to summary
pack-priv void afterInsert(HSSFPatriarch patriarch)

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.afterInsert.

Annotations
@Override
afterRemoveback to summary
protected void afterRemove(HSSFPatriarch patriarch)

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.afterRemove.

Doc from org.apache.poi.hssf.usermodel.HSSFShape.afterRemove.

remove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapes

Annotations
@Override
cloneShapeback to summary
protected HSSFShape cloneShape()

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.cloneShape.

Annotations
@Override
createObjRecordback to summary
protected ObjRecord createObjRecord()

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.createObjRecord.

Annotations
@Override
createSpContainerback to summary
protected EscherContainerRecord createSpContainer()

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.createSpContainer.

Annotations
@Override
createTextObjRecordback to summary
protected TextObjectRecord createTextObjRecord()
getOrCreateTextObjRecordback to summary
private TextObjectRecord getOrCreateTextObjRecord()
getShapeIdback to summary
public int getShapeId()

Overrides org.apache.poi.hssf.usermodel.HSSFShape.getShapeId.

Implements org.apache.poi.ss.usermodel.SimpleShape.getShapeId.

Returns:int

Doc from org.apache.poi.ss.usermodel.SimpleShape.getShapeId.

the shape id, which is unique within the sheet

Annotations
@Override
getShapeTypeback to summary
public int getShapeType()

Gets the shape type.

Returns:int

One of the OBJECT_TYPE_* constants.

See Also
OBJECT_TYPE_LINE, OBJECT_TYPE_OVAL, OBJECT_TYPE_RECTANGLE, OBJECT_TYPE_PICTURE, OBJECT_TYPE_COMMENT
getStringback to summary
public HSSFRichTextString getString()
Returns:HSSFRichTextString

the rich text string for this textbox.

getTextObjectRecordback to summary
protected TextObjectRecord getTextObjectRecord()
getWrapTextback to summary
public int getWrapText()
setShapeTypeback to summary
public void setShapeType(int value)
Parameters
value:int

- shapeType

See Also
HSSFShapeTypes
setStringback to summary
public void setString(RichTextString string)
Parameters
string:RichTextString

Sets the rich text string used by this object.

setWrapTextback to summary
public void setWrapText(int value)