public boolean getAutoSize() / public void setAutoSize(boolean value)
Indicates if size of shape is adjusted automatically according to its content.
Example:
shapeTextAlignment.setAutoSize(false);
getTextShapeType/setTextShapeType
public int getTextShapeType() / public void setTextShapeType(int value)
Gets and set the transform type of text.
The value of the property is AutoShapeType integer constant.
Example:
//Usually do not modify this value unless you know exactly what the modification will result in
shapeTextAlignment.setTextShapeType(AutoShapeType.TEXT_BOX);
getTopMarginPt/setTopMarginPt
public double getTopMarginPt() / public void setTopMarginPt(double value)
Returns the top margin in unit of Points
Example:
shapeTextAlignment.setTopMarginPt(2.0d);
getBottomMarginPt/setBottomMarginPt
public double getBottomMarginPt() / public void setBottomMarginPt(double value)
Returns the bottom margin in unit of Points
Example:
shapeTextAlignment.setBottomMarginPt(2.0d);
getLeftMarginPt/setLeftMarginPt
public double getLeftMarginPt() / public void setLeftMarginPt(double value)
Returns the left margin in unit of Points
Example:
shapeTextAlignment.setLeftMarginPt(2.0d);
getRightMarginPt/setRightMarginPt
public double getRightMarginPt() / public void setRightMarginPt(double value)
Returns the right margin in unit of Points
Example:
shapeTextAlignment.setRightMarginPt(2.0d);
isAutoMargin/setAutoMargin
public boolean isAutoMargin() / public void setAutoMargin(boolean value)
Indicates whether the margin of the text frame is automatic.
Example:
shapeTextAlignment.setAutoMargin(true);
Method Detail
equals
public boolean equals(java.lang.Object obj)
Determines whether this instance has the same value as another specified ShapeTextAlignment object.
Parameters:
obj - 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.
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
}