ShapeTextAlignment

ShapeTextAlignment class

Represents the setting of shape’s text alignment;

class ShapeTextAlignment;

Properties

PropertyTypeDescription
isTextWrappedbooleanGets or sets the text wrapped type of the shape which contains text.
rotateTextWithShapebooleanIndicates whether rotating text with shape.
textVerticalOverflowTextOverflowTypeGets and sets the text vertical overflow type of the text box.
textHorizontalOverflowTextOverflowTypeGets and sets the text horizontal overflow type of the text box.
rotationAnglenumberGets and sets the rotation of the shape.
textVerticalTypeTextVerticalTypeGets and sets the text direction.
isLockedTextbooleanIndicates whether the shape is locked when worksheet is protected.
autoSizebooleanIndicates if size of shape is adjusted automatically according to its content.
textShapeTypeAutoShapeTypeGets and set the transform type of text.
topMarginPtnumberReturns the top margin in unit of Points
bottomMarginPtnumberReturns the bottom margin in unit of Points
leftMarginPtnumberReturns the left margin in unit of Points
rightMarginPtnumberReturns the right margin in unit of Points
isAutoMarginbooleanIndicates whether the margin of the text frame is automatic.
numberOfColumnsnumberGets and sets the number of columns of text in the bounding rectangle.

Methods

MethodDescription
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.
equals(Object)Determines whether this instance has the same value as another specified ShapeTextAlignment object.
getHashCode()
isNull()Checks whether the implementation object is null.

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:

ParameterTypeDescription
valuebooleanThe 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:

ParameterTypeDescription
valuebooleanThe 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

TextOverflowType

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:

ParameterTypeDescription
valueTextOverflowTypeThe 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

TextOverflowType

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:

ParameterTypeDescription
valueTextOverflowTypeThe 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:

ParameterTypeDescription
valuenumberThe value to set.

getTextVerticalType()

@deprecated. Please use the ’textVerticalType’ property instead. Gets and sets the text direction.

getTextVerticalType() : TextVerticalType;

Returns

TextVerticalType

setTextVerticalType(TextVerticalType)

@deprecated. Please use the ’textVerticalType’ property instead. Gets and sets the text direction.

setTextVerticalType(value: TextVerticalType) : void;

Parameters:

ParameterTypeDescription
valueTextVerticalTypeThe 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:

ParameterTypeDescription
valuebooleanThe 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:

ParameterTypeDescription
valuebooleanThe value to set.

getTextShapeType()

@deprecated. Please use the ’textShapeType’ property instead. Gets and set the transform type of text.

getTextShapeType() : AutoShapeType;

Returns

AutoShapeType

setTextShapeType(AutoShapeType)

@deprecated. Please use the ’textShapeType’ property instead. Gets and set the transform type of text.

setTextShapeType(value: AutoShapeType) : void;

Parameters:

ParameterTypeDescription
valueAutoShapeTypeThe 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:

ParameterTypeDescription
valuenumberThe 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:

ParameterTypeDescription
valuenumberThe 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:

ParameterTypeDescription
valuenumberThe 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:

ParameterTypeDescription
valuenumberThe 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:

ParameterTypeDescription
valuebooleanThe 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:

ParameterTypeDescription
valuenumberThe value to set.

equals(Object)

Determines whether this instance has the same value as another specified ShapeTextAlignment object.

equals(obj: Object) : boolean;

Parameters:

ParameterTypeDescription
objObjectThe 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;

isNull()

Checks whether the implementation object is null.

isNull() : boolean;