ShapeTextAlignment
ShapeTextAlignment class
Represents the setting of shape’s text alignment;
class ShapeTextAlignment;
Properties
| Property | Type | Description |
|---|---|---|
| isTextWrapped | boolean | Gets or sets the text wrapped type of the shape which contains text. |
| rotateTextWithShape | boolean | Indicates whether rotating text with shape. |
| textVerticalOverflow | TextOverflowType | Gets and sets the text vertical overflow type of the text box. |
| textHorizontalOverflow | TextOverflowType | Gets and sets the text horizontal overflow type of the text box. |
| rotationAngle | number | Gets and sets the rotation of the shape. |
| textVerticalType | TextVerticalType | Gets and sets the text direction. |
| isLockedText | boolean | Indicates whether the shape is locked when worksheet is protected. |
| autoSize | boolean | Indicates if size of shape is adjusted automatically according to its content. |
| textShapeType | AutoShapeType | Gets and set the transform type of text. |
| topMarginPt | number | Returns the top margin in unit of Points |
| bottomMarginPt | number | Returns the bottom margin in unit of Points |
| leftMarginPt | number | Returns the left margin in unit of Points |
| rightMarginPt | number | Returns the right margin in unit of Points |
| isAutoMargin | boolean | Indicates whether the margin of the text frame is automatic. |
| numberOfColumns | number | Gets and sets the number of columns of text in the bounding rectangle. |
Methods
| Method | Description |
|---|---|
| isTextWrapped() | @deprecated. Please use the ‘isTextWrapped’ property instead. Gets or sets the text wrapped type of the shape which contains text. |
| setIsTextWrapped(boolean) | @deprecated. Please use the ‘isTextWrapped’ property instead. Gets or sets the text wrapped type of the shape which contains text. |
| getRotateTextWithShape() | @deprecated. Please use the ‘rotateTextWithShape’ property instead. Indicates whether rotating text with shape. |
| setRotateTextWithShape(boolean) | @deprecated. Please use the ‘rotateTextWithShape’ property instead. Indicates whether rotating text with shape. |
| getTextVerticalOverflow() | @deprecated. Please use the ’textVerticalOverflow’ property instead. Gets and sets the text vertical overflow type of the text box. |
| setTextVerticalOverflow(TextOverflowType) | @deprecated. Please use the ’textVerticalOverflow’ property instead. Gets and sets the text vertical overflow type of the text box. |
| getTextHorizontalOverflow() | @deprecated. Please use the ’textHorizontalOverflow’ property instead. Gets and sets the text horizontal overflow type of the text box. |
| setTextHorizontalOverflow(TextOverflowType) | @deprecated. Please use the ’textHorizontalOverflow’ property instead. Gets and sets the text horizontal overflow type of the text box. |
| getRotationAngle() | @deprecated. Please use the ‘rotationAngle’ property instead. Gets and sets the rotation of the shape. |
| setRotationAngle(number) | @deprecated. Please use the ‘rotationAngle’ property instead. Gets and sets the rotation of the shape. |
| getTextVerticalType() | @deprecated. Please use the ’textVerticalType’ property instead. Gets and sets the text direction. |
| setTextVerticalType(TextVerticalType) | @deprecated. Please use the ’textVerticalType’ property instead. Gets and sets the text direction. |
| isLockedText() | @deprecated. Please use the ‘isLockedText’ property instead. Indicates whether the shape is locked when worksheet is protected. |
| setIsLockedText(boolean) | @deprecated. Please use the ‘isLockedText’ property instead. Indicates whether the shape is locked when worksheet is protected. |
| getAutoSize() | @deprecated. Please use the ‘autoSize’ property instead. Indicates if size of shape is adjusted automatically according to its content. |
| setAutoSize(boolean) | @deprecated. Please use the ‘autoSize’ property instead. Indicates if size of shape is adjusted automatically according to its content. |
| getTextShapeType() | @deprecated. Please use the ’textShapeType’ property instead. Gets and set the transform type of text. |
| setTextShapeType(AutoShapeType) | @deprecated. Please use the ’textShapeType’ property instead. Gets and set the transform type of text. |
| getTopMarginPt() | @deprecated. Please use the ’topMarginPt’ property instead. Returns the top margin in unit of Points |
| setTopMarginPt(number) | @deprecated. Please use the ’topMarginPt’ property instead. Returns the top margin in unit of Points |
| getBottomMarginPt() | @deprecated. Please use the ‘bottomMarginPt’ property instead. Returns the bottom margin in unit of Points |
| setBottomMarginPt(number) | @deprecated. Please use the ‘bottomMarginPt’ property instead. Returns the bottom margin in unit of Points |
| getLeftMarginPt() | @deprecated. Please use the ’leftMarginPt’ property instead. Returns the left margin in unit of Points |
| setLeftMarginPt(number) | @deprecated. Please use the ’leftMarginPt’ property instead. Returns the left margin in unit of Points |
| getRightMarginPt() | @deprecated. Please use the ‘rightMarginPt’ property instead. Returns the right margin in unit of Points |
| setRightMarginPt(number) | @deprecated. Please use the ‘rightMarginPt’ property instead. Returns the right margin in unit of Points |
| isAutoMargin() | @deprecated. Please use the ‘isAutoMargin’ property instead. Indicates whether the margin of the text frame is automatic. |
| setIsAutoMargin(boolean) | @deprecated. Please use the ‘isAutoMargin’ property instead. Indicates whether the margin of the text frame is automatic. |
| getNumberOfColumns() | @deprecated. Please use the ’numberOfColumns’ property instead. Gets and sets the number of columns of text in the bounding rectangle. |
| setNumberOfColumns(number) | @deprecated. Please use the ’numberOfColumns’ property instead. Gets and sets the number of columns of text in the bounding rectangle. |
| isNull() | Checks whether the implementation object is null. |
| equals(Object) | Determines whether this instance has the same value as another specified ShapeTextAlignment object. |
| getHashCode() |
isTextWrapped
Gets or sets the text wrapped type of the shape which contains text.
isTextWrapped : boolean;
rotateTextWithShape
Indicates whether rotating text with shape.
rotateTextWithShape : boolean;
textVerticalOverflow
Gets and sets the text vertical overflow type of the text box.
textVerticalOverflow : TextOverflowType;
textHorizontalOverflow
Gets and sets the text horizontal overflow type of the text box.
textHorizontalOverflow : TextOverflowType;
rotationAngle
Gets and sets the rotation of the shape.
rotationAngle : number;
textVerticalType
Gets and sets the text direction.
textVerticalType : TextVerticalType;
isLockedText
Indicates whether the shape is locked when worksheet is protected.
isLockedText : boolean;
Remarks
Only works when worksheet is protected.
autoSize
Indicates if size of shape is adjusted automatically according to its content.
autoSize : boolean;
textShapeType
Gets and set the transform type of text.
textShapeType : AutoShapeType;
topMarginPt
Returns the top margin in unit of Points
topMarginPt : number;
bottomMarginPt
Returns the bottom margin in unit of Points
bottomMarginPt : number;
leftMarginPt
Returns the left margin in unit of Points
leftMarginPt : number;
rightMarginPt
Returns the right margin in unit of Points
rightMarginPt : number;
isAutoMargin
Indicates whether the margin of the text frame is automatic.
isAutoMargin : boolean;
numberOfColumns
Gets and sets the number of columns of text in the bounding rectangle.
numberOfColumns : number;
isTextWrapped()
@deprecated. Please use the ‘isTextWrapped’ property instead. Gets or sets the text wrapped type of the shape which contains text.
isTextWrapped() : boolean;
setIsTextWrapped(boolean)
@deprecated. Please use the ‘isTextWrapped’ property instead. Gets or sets the text wrapped type of the shape which contains text.
setIsTextWrapped(value: boolean) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | The value to set. |
getRotateTextWithShape()
@deprecated. Please use the ‘rotateTextWithShape’ property instead. Indicates whether rotating text with shape.
getRotateTextWithShape() : boolean;
setRotateTextWithShape(boolean)
@deprecated. Please use the ‘rotateTextWithShape’ property instead. Indicates whether rotating text with shape.
setRotateTextWithShape(value: boolean) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | The value to set. |
getTextVerticalOverflow()
@deprecated. Please use the ’textVerticalOverflow’ property instead. Gets and sets the text vertical overflow type of the text box.
getTextVerticalOverflow() : TextOverflowType;
Returns
setTextVerticalOverflow(TextOverflowType)
@deprecated. Please use the ’textVerticalOverflow’ property instead. Gets and sets the text vertical overflow type of the text box.
setTextVerticalOverflow(value: TextOverflowType) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | TextOverflowType | The value to set. |
getTextHorizontalOverflow()
@deprecated. Please use the ’textHorizontalOverflow’ property instead. Gets and sets the text horizontal overflow type of the text box.
getTextHorizontalOverflow() : TextOverflowType;
Returns
setTextHorizontalOverflow(TextOverflowType)
@deprecated. Please use the ’textHorizontalOverflow’ property instead. Gets and sets the text horizontal overflow type of the text box.
setTextHorizontalOverflow(value: TextOverflowType) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | TextOverflowType | The value to set. |
getRotationAngle()
@deprecated. Please use the ‘rotationAngle’ property instead. Gets and sets the rotation of the shape.
getRotationAngle() : number;
setRotationAngle(number)
@deprecated. Please use the ‘rotationAngle’ property instead. Gets and sets the rotation of the shape.
setRotationAngle(value: number) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | number | The value to set. |
getTextVerticalType()
@deprecated. Please use the ’textVerticalType’ property instead. Gets and sets the text direction.
getTextVerticalType() : TextVerticalType;
Returns
setTextVerticalType(TextVerticalType)
@deprecated. Please use the ’textVerticalType’ property instead. Gets and sets the text direction.
setTextVerticalType(value: TextVerticalType) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | TextVerticalType | The value to set. |
isLockedText()
@deprecated. Please use the ‘isLockedText’ property instead. Indicates whether the shape is locked when worksheet is protected.
isLockedText() : boolean;
Remarks
Only works when worksheet is protected.
setIsLockedText(boolean)
@deprecated. Please use the ‘isLockedText’ property instead. Indicates whether the shape is locked when worksheet is protected.
setIsLockedText(value: boolean) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | The value to set. |
Remarks
Only works when worksheet is protected.
getAutoSize()
@deprecated. Please use the ‘autoSize’ property instead. Indicates if size of shape is adjusted automatically according to its content.
getAutoSize() : boolean;
setAutoSize(boolean)
@deprecated. Please use the ‘autoSize’ property instead. Indicates if size of shape is adjusted automatically according to its content.
setAutoSize(value: boolean) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | The value to set. |
getTextShapeType()
@deprecated. Please use the ’textShapeType’ property instead. Gets and set the transform type of text.
getTextShapeType() : AutoShapeType;
Returns
setTextShapeType(AutoShapeType)
@deprecated. Please use the ’textShapeType’ property instead. Gets and set the transform type of text.
setTextShapeType(value: AutoShapeType) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | AutoShapeType | The value to set. |
getTopMarginPt()
@deprecated. Please use the ’topMarginPt’ property instead. Returns the top margin in unit of Points
getTopMarginPt() : number;
setTopMarginPt(number)
@deprecated. Please use the ’topMarginPt’ property instead. Returns the top margin in unit of Points
setTopMarginPt(value: number) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | number | The value to set. |
getBottomMarginPt()
@deprecated. Please use the ‘bottomMarginPt’ property instead. Returns the bottom margin in unit of Points
getBottomMarginPt() : number;
setBottomMarginPt(number)
@deprecated. Please use the ‘bottomMarginPt’ property instead. Returns the bottom margin in unit of Points
setBottomMarginPt(value: number) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | number | The value to set. |
getLeftMarginPt()
@deprecated. Please use the ’leftMarginPt’ property instead. Returns the left margin in unit of Points
getLeftMarginPt() : number;
setLeftMarginPt(number)
@deprecated. Please use the ’leftMarginPt’ property instead. Returns the left margin in unit of Points
setLeftMarginPt(value: number) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | number | The value to set. |
getRightMarginPt()
@deprecated. Please use the ‘rightMarginPt’ property instead. Returns the right margin in unit of Points
getRightMarginPt() : number;
setRightMarginPt(number)
@deprecated. Please use the ‘rightMarginPt’ property instead. Returns the right margin in unit of Points
setRightMarginPt(value: number) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | number | The value to set. |
isAutoMargin()
@deprecated. Please use the ‘isAutoMargin’ property instead. Indicates whether the margin of the text frame is automatic.
isAutoMargin() : boolean;
setIsAutoMargin(boolean)
@deprecated. Please use the ‘isAutoMargin’ property instead. Indicates whether the margin of the text frame is automatic.
setIsAutoMargin(value: boolean) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | The value to set. |
getNumberOfColumns()
@deprecated. Please use the ’numberOfColumns’ property instead. Gets and sets the number of columns of text in the bounding rectangle.
getNumberOfColumns() : number;
setNumberOfColumns(number)
@deprecated. Please use the ’numberOfColumns’ property instead. Gets and sets the number of columns of text in the bounding rectangle.
setNumberOfColumns(value: number) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | number | The value to set. |
isNull()
Checks whether the implementation object is null.
isNull() : boolean;
equals(Object)
Determines whether this instance has the same value as another specified ShapeTextAlignment object.
equals(obj: Object) : boolean;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | Object | The ShapeTextAlignment object to compare with this instance. |
Returns
true if the value of the obj parameter is the same as the value of this instance; otherwise, false. If obj is null, this method returns false.
getHashCode()
getHashCode() : number;