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

public Class HSSFTextbox

extends HSSFSimpleShape
Class Inheritance
Known Direct Subclasses
org.apache.poi.hssf.usermodel.HSSFComment
Imports
org.apache.poi.ddf.DefaultEscherRecordFactory, .EscherBoolProperty, .EscherClientDataRecord, .EscherContainerRecord, .EscherOptRecord, .EscherPropertyTypes, .EscherRGBProperty, .EscherRecord, .EscherSimpleProperty, .EscherSpRecord, .EscherTextboxRecord, org.apache.poi.hssf.record.CommonObjectDataSubRecord, .EndSubRecord, .EscherAggregate, .ObjRecord, .TextObjectRecord, org.apache.poi.sl.usermodel.ShapeType

A textbox is a shape that may hold a rich text string.

Field Summary

Modifier and TypeField and Description
public static final short
public static final short
public static final short
public static final short
HORIZONTAL_ALIGNMENT_LEFT

How to align text horizontally

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
VERTICAL_ALIGNMENT_TOP

How to align text vertically

Inherited from org.apache.poi.hssf.usermodel.HSSFSimpleShape:
OBJECT_TYPE_ARCOBJECT_TYPE_COMBO_BOXOBJECT_TYPE_COMMENTOBJECT_TYPE_LINEOBJECT_TYPE_MICROSOFT_OFFICE_DRAWINGOBJECT_TYPE_OVALOBJECT_TYPE_PICTUREOBJECT_TYPE_RECTANGLEWRAP_BY_POINTSWRAP_NONEWRAP_SQUARE

Constructor Summary

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

public
HSSFTextbox(HSSFShape
the parent shape
parent
,
HSSFAnchor
One of HSSFClientAnchor or HSSFChildAnchor
anchor
)

Construct a new textbox with the given parent and anchor.

Method Summary

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

Overrides org.apache.poi.hssf.usermodel.HSSFSimpleShape.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
public short
getHorizontalAlignment()

Gets the horizontal alignment.

public int
getMarginBottom()

Gets the bottom margin within the textbox.

public int

Returns:

Returns the left margin within the textbox.
getMarginLeft
()

public int

Returns:

returns the right margin within the textbox.
getMarginRight
()

public int

Returns:

returns the top margin within the textbox.
getMarginTop
()

public short
getVerticalAlignment()

Gets the vertical alignment.

public void
setHorizontalAlignment(short align)

Sets the horizontal alignment.

public void
setMarginBottom(int marginBottom)

Sets the bottom margin within the textbox.

public void
setMarginLeft(int marginLeft)

Sets the left margin within the textbox.

public void
setMarginRight(int marginRight)

Sets the right margin within the textbox.

public void
setMarginTop(int marginTop)

Sets the top margin within the textbox.

public void
public void
setVerticalAlignment(short align)

Sets the vertical alignment.

Inherited from org.apache.poi.hssf.usermodel.HSSFSimpleShape:
createTextObjRecordgetShapeIdgetShapeTypegetStringgetTextObjectRecordgetWrapTextsetStringsetWrapText

Field Detail

HORIZONTAL_ALIGNMENT_CENTEREDback to summary
public static final short HORIZONTAL_ALIGNMENT_CENTERED
HORIZONTAL_ALIGNMENT_DISTRIBUTEDback to summary
public static final short HORIZONTAL_ALIGNMENT_DISTRIBUTED
HORIZONTAL_ALIGNMENT_JUSTIFIEDback to summary
public static final short HORIZONTAL_ALIGNMENT_JUSTIFIED
HORIZONTAL_ALIGNMENT_LEFTback to summary
public static final short HORIZONTAL_ALIGNMENT_LEFT

How to align text horizontally

HORIZONTAL_ALIGNMENT_RIGHTback to summary
public static final short HORIZONTAL_ALIGNMENT_RIGHT
OBJECT_TYPE_TEXTback to summary
public static final short OBJECT_TYPE_TEXT
VERTICAL_ALIGNMENT_BOTTOMback to summary
public static final short VERTICAL_ALIGNMENT_BOTTOM
VERTICAL_ALIGNMENT_CENTERback to summary
public static final short VERTICAL_ALIGNMENT_CENTER
VERTICAL_ALIGNMENT_DISTRIBUTEDback to summary
public static final short VERTICAL_ALIGNMENT_DISTRIBUTED
VERTICAL_ALIGNMENT_JUSTIFYback to summary
public static final short VERTICAL_ALIGNMENT_JUSTIFY
VERTICAL_ALIGNMENT_TOPback to summary
public static final short VERTICAL_ALIGNMENT_TOP

How to align text vertically

Constructor Detail

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

Construct a new textbox with the given parent and anchor.

Parameters
parent:HSSFShape

the parent shape

anchor:HSSFAnchor

One of HSSFClientAnchor or HSSFChildAnchor

Method Detail

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

Overrides org.apache.poi.hssf.usermodel.HSSFSimpleShape.afterInsert.

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

Overrides org.apache.poi.hssf.usermodel.HSSFSimpleShape.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()

Overrides org.apache.poi.hssf.usermodel.HSSFSimpleShape.cloneShape.

Annotations
@Override
createObjRecordback to summary
protected ObjRecord createObjRecord()

Overrides org.apache.poi.hssf.usermodel.HSSFSimpleShape.createObjRecord.

Annotations
@Override
createSpContainerback to summary
protected EscherContainerRecord createSpContainer()

Overrides org.apache.poi.hssf.usermodel.HSSFSimpleShape.createSpContainer.

Annotations
@Override
getHorizontalAlignmentback to summary
public short getHorizontalAlignment()

Gets the horizontal alignment.

getMarginBottomback to summary
public int getMarginBottom()

Gets the bottom margin within the textbox.

getMarginLeftback to summary
public int getMarginLeft()
Returns:int

Returns the left margin within the textbox.

getMarginRightback to summary
public int getMarginRight()
Returns:int

returns the right margin within the textbox.

getMarginTopback to summary
public int getMarginTop()
Returns:int

returns the top margin within the textbox.

getVerticalAlignmentback to summary
public short getVerticalAlignment()

Gets the vertical alignment.

setHorizontalAlignmentback to summary
public void setHorizontalAlignment(short align)

Sets the horizontal alignment.

setMarginBottomback to summary
public void setMarginBottom(int marginBottom)

Sets the bottom margin within the textbox.

setMarginLeftback to summary
public void setMarginLeft(int marginLeft)

Sets the left margin within the textbox.

setMarginRightback to summary
public void setMarginRight(int marginRight)

Sets the right margin within the textbox.

setMarginTopback to summary
public void setMarginTop(int marginTop)

Sets the top margin within the textbox.

setShapeTypeback to summary
public void setShapeType(int shapeType)

Overrides org.apache.poi.hssf.usermodel.HSSFSimpleShape.setShapeType.

Parameters
shapeType:int

Doc from org.apache.poi.hssf.usermodel.HSSFSimpleShape.setShapeType.

- shapeType

Annotations
@Override
setVerticalAlignmentback to summary
public void setVerticalAlignment(short align)

Sets the vertical alignment.