ShapeTextAlignment

ShapeTextAlignment class

Represents the setting of shape’s text alignment;

class ShapeTextAlignment;

Methods

MethodDescription
isTextWrapped()Gets or sets the text wrapped type of the shape which contains text.
setIsTextWrapped(boolean)Gets or sets the text wrapped type of the shape which contains text.
getRotateTextWithShape()Indicates whether rotating text with shape.
setRotateTextWithShape(boolean)Indicates whether rotating text with shape.
getTextVerticalOverflow()Gets and sets the text vertical overflow type of the text box.
setTextVerticalOverflow(TextOverflowType)Gets and sets the text vertical overflow type of the text box.
getTextHorizontalOverflow()Gets and sets the text horizontal overflow type of the text box.
setTextHorizontalOverflow(TextOverflowType)Gets and sets the text horizontal overflow type of the text box.
getRotationAngle()Gets and sets the rotation of the shape.
setRotationAngle(number)Gets and sets the rotation of the shape.
getTextVerticalType()Gets and sets the text direction.
setTextVerticalType(TextVerticalType)Gets and sets the text direction.
isLockedText()Indicates whether the shape is locked when worksheet is protected.
setIsLockedText(boolean)Indicates whether the shape is locked when worksheet is protected.
getAutoSize()Indicates if size of shape is adjusted automatically according to its content.
setAutoSize(boolean)Indicates if size of shape is adjusted automatically according to its content.
getTextShapeType()Gets and set the transform type of text.
setTextShapeType(AutoShapeType)Gets and set the transform type of text.
getTopMarginPt()Returns the top margin in unit of Points
setTopMarginPt(number)Returns the top margin in unit of Points
getBottomMarginPt()Returns the bottom margin in unit of Points
setBottomMarginPt(number)Returns the bottom margin in unit of Points
getLeftMarginPt()Returns the left margin in unit of Points
setLeftMarginPt(number)Returns the left margin in unit of Points
getRightMarginPt()Returns the right margin in unit of Points
setRightMarginPt(number)Returns the right margin in unit of Points
isAutoMargin()Indicates whether the margin of the text frame is automatic.
setIsAutoMargin(boolean)Indicates whether the margin of the text frame is automatic.
getNumberOfColumns()Gets and sets the number of columns of text in the bounding rectangle.
setNumberOfColumns(number)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;

setIsTextWrapped(boolean)

Gets or sets the text wrapped type of the shape which contains text.

setIsTextWrapped(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getRotateTextWithShape()

Indicates whether rotating text with shape.

getRotateTextWithShape() : boolean;

setRotateTextWithShape(boolean)

Indicates whether rotating text with shape.

setRotateTextWithShape(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getTextVerticalOverflow()

Gets and sets the text vertical overflow type of the text box.

getTextVerticalOverflow() : TextOverflowType;

Returns

TextOverflowType

setTextVerticalOverflow(TextOverflowType)

Gets and sets the text vertical overflow type of the text box.

setTextVerticalOverflow(value: TextOverflowType) : void;

Parameters:

ParameterTypeDescription
valueTextOverflowTypeThe value to set.

getTextHorizontalOverflow()

Gets and sets the text horizontal overflow type of the text box.

getTextHorizontalOverflow() : TextOverflowType;

Returns

TextOverflowType

setTextHorizontalOverflow(TextOverflowType)

Gets and sets the text horizontal overflow type of the text box.

setTextHorizontalOverflow(value: TextOverflowType) : void;

Parameters:

ParameterTypeDescription
valueTextOverflowTypeThe value to set.

getRotationAngle()

Gets and sets the rotation of the shape.

getRotationAngle() : number;

setRotationAngle(number)

Gets and sets the rotation of the shape.

setRotationAngle(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getTextVerticalType()

Gets and sets the text direction.

getTextVerticalType() : TextVerticalType;

Returns

TextVerticalType

setTextVerticalType(TextVerticalType)

Gets and sets the text direction.

setTextVerticalType(value: TextVerticalType) : void;

Parameters:

ParameterTypeDescription
valueTextVerticalTypeThe value to set.

isLockedText()

Indicates whether the shape is locked when worksheet is protected.

isLockedText() : boolean;

Remarks

Only works when worksheet is protected.

setIsLockedText(boolean)

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()

Indicates if size of shape is adjusted automatically according to its content.

getAutoSize() : boolean;

setAutoSize(boolean)

Indicates if size of shape is adjusted automatically according to its content.

setAutoSize(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getTextShapeType()

Gets and set the transform type of text.

getTextShapeType() : AutoShapeType;

Returns

AutoShapeType

setTextShapeType(AutoShapeType)

Gets and set the transform type of text.

setTextShapeType(value: AutoShapeType) : void;

Parameters:

ParameterTypeDescription
valueAutoShapeTypeThe value to set.

getTopMarginPt()

Returns the top margin in unit of Points

getTopMarginPt() : number;

setTopMarginPt(number)

Returns the top margin in unit of Points

setTopMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getBottomMarginPt()

Returns the bottom margin in unit of Points

getBottomMarginPt() : number;

setBottomMarginPt(number)

Returns the bottom margin in unit of Points

setBottomMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLeftMarginPt()

Returns the left margin in unit of Points

getLeftMarginPt() : number;

setLeftMarginPt(number)

Returns the left margin in unit of Points

setLeftMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getRightMarginPt()

Returns the right margin in unit of Points

getRightMarginPt() : number;

setRightMarginPt(number)

Returns the right margin in unit of Points

setRightMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

isAutoMargin()

Indicates whether the margin of the text frame is automatic.

isAutoMargin() : boolean;

setIsAutoMargin(boolean)

Indicates whether the margin of the text frame is automatic.

setIsAutoMargin(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getNumberOfColumns()

Gets and sets the number of columns of text in the bounding rectangle.

getNumberOfColumns() : number;

setNumberOfColumns(number)

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;