public class ShapeTextAlignment
extends java.lang.Object
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
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Determines whether this instance has the same value as another specified
ShapeTextAlignment object. |
boolean |
getAutoSize()
Indicates if size of shape is adjusted automatically according to its content.
|
double |
getBottomMarginPt()
Returns the bottom margin in unit of Points
|
double |
getLeftMarginPt()
Returns the left margin in unit of Points
|
int |
getNumberOfColumns()
Gets the number of columns of text in the bounding rectangle.
|
double |
getRightMarginPt()
Returns the right margin in unit of Points
|
boolean |
getRotateTextWithShape()
Indicates whether rotating text with shape.
|
double |
getRotationAngle()
Gets the rotation of the shape.
|
int |
getTextHorizontalOverflow()
Gets the text horizontal overflow type of the text box.
|
int |
getTextShapeType()
Gets the transform type of text.
|
int |
getTextVerticalOverflow()
Gets the text vertical overflow type of the text box.
|
int |
getTextVerticalType()
Gets the text direction.
|
double |
getTopMarginPt()
Returns the top margin in unit of Points
|
int |
hashCode() |
boolean |
isAutoMargin()
Indicates whether the margin of the text frame is automatic.
|
boolean |
isLockedText()
Indicates whether the shape is locked when worksheet is protected.
|
boolean |
isTextWrapped()
Gets the text wrapped type of the shape which contains text.
|
void |
setAutoMargin(boolean value)
Indicates whether the margin of the text frame is automatic.
|
void |
setAutoSize(boolean value)
Indicates if size of shape is adjusted automatically according to its content.
|
void |
setBottomMarginPt(double value)
Returns the bottom margin in unit of Points
|
void |
setLeftMarginPt(double value)
Returns the left margin in unit of Points
|
void |
setLockedText(boolean value)
Indicates whether the shape is locked when worksheet is protected.
|
void |
setNumberOfColumns(int value)
Sets the number of columns of text in the bounding rectangle.
|
void |
setRightMarginPt(double value)
Returns the right margin in unit of Points
|
void |
setRotateTextWithShape(boolean value)
Indicates whether rotating text with shape.
|
void |
setRotationAngle(double value)
Sets the rotation of the shape.
|
void |
setTextHorizontalOverflow(int value)
Sets the text horizontal overflow type of the text box.
|
void |
setTextShapeType(int value)
Sets the transform type of text.
|
void |
setTextVerticalOverflow(int value)
Sets the text vertical overflow type of the text box.
|
void |
setTextVerticalType(int value)
Sets the text direction.
|
void |
setTextWrapped(boolean value)
Sets the text wrapped type of the shape which contains text.
|
void |
setTopMarginPt(double value)
Returns the top margin in unit of Points
|
public boolean isTextWrapped()
Example
shapeTextAlignment.setTextWrapped(true);
public void setTextWrapped(boolean value)
public boolean getRotateTextWithShape()
Example
shapeTextAlignment.setRotateTextWithShape(true);
public void setRotateTextWithShape(boolean value)
public int getTextVerticalOverflow()
See TextOverflowType.
Example
shapeTextAlignment.setTextVerticalOverflow(TextOverflowType.CLIP);
public void setTextVerticalOverflow(int value)
See TextOverflowType.
public int getTextHorizontalOverflow()
See TextOverflowType.
Example
shapeTextAlignment.setTextHorizontalOverflow(TextOverflowType.CLIP);
public void setTextHorizontalOverflow(int value)
See TextOverflowType.
public double getRotationAngle()
Example
shapeTextAlignment.setRotationAngle(90);
public void setRotationAngle(double value)
public int getTextVerticalType()
See TextVerticalType.
Example
shapeTextAlignment.setTextVerticalType(com.aspose.cells.TextVerticalType.HORIZONTAL);
public void setTextVerticalType(int value)
See TextVerticalType.
public boolean isLockedText()
Remarks
Only works when worksheet is protected.public void setLockedText(boolean value)
Remarks
Only works when worksheet is protected.public boolean getAutoSize()
Example
shapeTextAlignment.setAutoSize(false);
public void setAutoSize(boolean value)
public int getTextShapeType()
See AutoShapeType.
Example
//Usually do not modify this value unless you know exactly what the modification will result in
shapeTextAlignment.setTextShapeType(AutoShapeType.TEXT_BOX);
public void setTextShapeType(int value)
See AutoShapeType.
public double getTopMarginPt()
Example
shapeTextAlignment.setTopMarginPt(2.0d);
public void setTopMarginPt(double value)
public double getBottomMarginPt()
Example
shapeTextAlignment.setBottomMarginPt(2.0d);
public void setBottomMarginPt(double value)
public double getLeftMarginPt()
Example
shapeTextAlignment.setLeftMarginPt(2.0d);
public void setLeftMarginPt(double value)
public double getRightMarginPt()
Example
shapeTextAlignment.setRightMarginPt(2.0d);
public void setRightMarginPt(double value)
public boolean isAutoMargin()
Example
shapeTextAlignment.setAutoMargin(true);
public void setAutoMargin(boolean value)
public int getNumberOfColumns()
public void setNumberOfColumns(int value)
public boolean equals(java.lang.Object obj)
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
}
equals in class java.lang.Objectobj - The ShapeTextAlignment object to compare with this instance.public int hashCode()
hashCode in class java.lang.ObjectSee Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.