ShapeTextAlignment
Inheritance: java.lang.Object
public class ShapeTextAlignment
Represents the setting of shape’s text alignment;
Example
//Instantiating a Workbook object
Workbook workbook = new Workbook();
Shape shape = workbook.getWorksheets().get(0).getShapes().addRectangle(1, 0, 1, 0, 50, 100);
ShapeTextAlignment shapeTextAlignment = shape.getTextBody().getTextAlignment();
//do your business
Methods
Method | Description |
---|---|
equals(Object obj) | Determines whether this instance has the same value as another specified ShapeTextAlignment object. |
getAutoSize() | Indicates if size of shape is adjusted automatically according to its content. |
getBottomMarginPt() | Returns the bottom margin in unit of Points |
getClass() | |
getLeftMarginPt() | Returns the left margin in unit of Points |
getNumberOfColumns() | Gets the number of columns of text in the bounding rectangle. |
getRightMarginPt() | Returns the right margin in unit of Points |
getRotateTextWithShape() | Indicates whether rotating text with shape. |
getRotationAngle() | Gets the rotation of the shape. |
getTextHorizontalOverflow() | Gets the text horizontal overflow type of the text box. |
getTextShapeType() | Gets the transform type of text. |
getTextVerticalOverflow() | Gets the text vertical overflow type of the text box. |
getTextVerticalType() | Gets the text direction. |
getTopMarginPt() | Returns the top margin in unit of Points |
hashCode() | |
isAutoMargin() | Indicates whether the margin of the text frame is automatic. |
isLockedText() | Indicates whether the shape is locked when worksheet is protected. |
isTextWrapped() | Gets the text wrapped type of the shape which contains text. |
notify() | |
notifyAll() | |
setAutoMargin(boolean value) | Indicates whether the margin of the text frame is automatic. |
setAutoSize(boolean value) | Indicates if size of shape is adjusted automatically according to its content. |
setBottomMarginPt(double value) | Returns the bottom margin in unit of Points |
setLeftMarginPt(double value) | Returns the left margin in unit of Points |
setLockedText(boolean value) | Indicates whether the shape is locked when worksheet is protected. |
setNumberOfColumns(int value) | Sets the number of columns of text in the bounding rectangle. |
setRightMarginPt(double value) | Returns the right margin in unit of Points |
setRotateTextWithShape(boolean value) | Indicates whether rotating text with shape. |
setRotationAngle(double value) | Sets the rotation of the shape. |
setTextHorizontalOverflow(int value) | Sets the text horizontal overflow type of the text box. |
setTextShapeType(int value) | Sets the transform type of text. |
setTextVerticalOverflow(int value) | Sets the text vertical overflow type of the text box. |
setTextVerticalType(int value) | Sets the text direction. |
setTextWrapped(boolean value) | Sets the text wrapped type of the shape which contains text. |
setTopMarginPt(double value) | Returns the top margin in unit of Points |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
equals(Object obj)
public boolean equals(Object obj)
Determines whether this instance has the same value as another specified ShapeTextAlignment object.
Example
//You have to make sure that the index value in this line of code exists
ShapeTextAlignment obj = workbook.getWorksheets().get(0).getShapes().get(0).getTextBody().getTextAlignment();
if (shapeTextAlignment.equals(obj))
{
//do what you want
}
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object | The ShapeTextAlignment object to compare with this instance. |
Returns: boolean - 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.
getAutoSize()
public boolean getAutoSize()
Indicates if size of shape is adjusted automatically according to its content.
Example
shapeTextAlignment.setAutoSize(false);
Returns: boolean
getBottomMarginPt()
public double getBottomMarginPt()
Returns the bottom margin in unit of Points
Example
shapeTextAlignment.setBottomMarginPt(2.0d);
Returns: double
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getLeftMarginPt()
public double getLeftMarginPt()
Returns the left margin in unit of Points
Example
shapeTextAlignment.setLeftMarginPt(2.0d);
Returns: double
getNumberOfColumns()
public int getNumberOfColumns()
Gets the number of columns of text in the bounding rectangle.
Returns: int
getRightMarginPt()
public double getRightMarginPt()
Returns the right margin in unit of Points
Example
shapeTextAlignment.setRightMarginPt(2.0d);
Returns: double
getRotateTextWithShape()
public boolean getRotateTextWithShape()
Indicates whether rotating text with shape.
Example
shapeTextAlignment.setRotateTextWithShape(true);
Returns: boolean
getRotationAngle()
public double getRotationAngle()
Gets the rotation of the shape.
Example
shapeTextAlignment.setRotationAngle(90);
Returns: double
getTextHorizontalOverflow()
public int getTextHorizontalOverflow()
Gets the text horizontal overflow type of the text box.
See TextOverflowType.
Example
shapeTextAlignment.setTextHorizontalOverflow(TextOverflowType.CLIP);
Returns: int
getTextShapeType()
public int getTextShapeType()
Gets the transform type of text.
See AutoShapeType.
Example
//Usually do not modify this value unless you know exactly what the modification will result in
shapeTextAlignment.setTextShapeType(AutoShapeType.TEXT_BOX);
Returns: int
getTextVerticalOverflow()
public int getTextVerticalOverflow()
Gets the text vertical overflow type of the text box.
See TextOverflowType.
Example
shapeTextAlignment.setTextVerticalOverflow(TextOverflowType.CLIP);
Returns: int
getTextVerticalType()
public int getTextVerticalType()
Gets the text direction.
See TextVerticalType.
Example
shapeTextAlignment.setTextVerticalType(com.aspose.cells.TextVerticalType.HORIZONTAL);
Returns: int
getTopMarginPt()
public double getTopMarginPt()
Returns the top margin in unit of Points
Example
shapeTextAlignment.setTopMarginPt(2.0d);
Returns: double
hashCode()
public int hashCode()
Returns: int -
isAutoMargin()
public boolean isAutoMargin()
Indicates whether the margin of the text frame is automatic.
Example
shapeTextAlignment.setAutoMargin(true);
Returns: boolean
isLockedText()
public boolean isLockedText()
Indicates whether the shape is locked when worksheet is protected.
Remarks
Only works when worksheet is protected.
Returns: boolean
isTextWrapped()
public boolean isTextWrapped()
Gets the text wrapped type of the shape which contains text.
Example
shapeTextAlignment.setTextWrapped(true);
Returns: boolean
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setAutoMargin(boolean value)
public void setAutoMargin(boolean value)
Indicates whether the margin of the text frame is automatic.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setAutoSize(boolean value)
public void setAutoSize(boolean value)
Indicates if size of shape is adjusted automatically according to its content.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setBottomMarginPt(double value)
public void setBottomMarginPt(double value)
Returns the bottom margin in unit of Points
Parameters:
Parameter | Type | Description |
---|---|---|
value | double |
setLeftMarginPt(double value)
public void setLeftMarginPt(double value)
Returns the left margin in unit of Points
Parameters:
Parameter | Type | Description |
---|---|---|
value | double |
setLockedText(boolean value)
public void setLockedText(boolean value)
Indicates whether the shape is locked when worksheet is protected.
Remarks
Only works when worksheet is protected.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setNumberOfColumns(int value)
public void setNumberOfColumns(int value)
Sets the number of columns of text in the bounding rectangle.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setRightMarginPt(double value)
public void setRightMarginPt(double value)
Returns the right margin in unit of Points
Parameters:
Parameter | Type | Description |
---|---|---|
value | double |
setRotateTextWithShape(boolean value)
public void setRotateTextWithShape(boolean value)
Indicates whether rotating text with shape.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setRotationAngle(double value)
public void setRotationAngle(double value)
Sets the rotation of the shape.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double |
setTextHorizontalOverflow(int value)
public void setTextHorizontalOverflow(int value)
Sets the text horizontal overflow type of the text box.
See TextOverflowType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setTextShapeType(int value)
public void setTextShapeType(int value)
Sets the transform type of text.
See AutoShapeType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setTextVerticalOverflow(int value)
public void setTextVerticalOverflow(int value)
Sets the text vertical overflow type of the text box.
See TextOverflowType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setTextVerticalType(int value)
public void setTextVerticalType(int value)
Sets the text direction.
See TextVerticalType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setTextWrapped(boolean value)
public void setTextWrapped(boolean value)
Sets the text wrapped type of the shape which contains text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setTopMarginPt(double value)
public void setTopMarginPt(double value)
Returns the top margin in unit of Points
Parameters:
Parameter | Type | Description |
---|---|---|
value | double |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |