java.lang.Iterable<XSLFTextParagraph>XSLFAutoShape, XSLFTableCell@Beta public abstract class XSLFTextShape extends XSLFSimpleShape implements java.lang.Iterable<XSLFTextParagraph>
| Modifier and Type | Method | Description |
|---|---|---|
XSLFTextParagraph |
addNewTextParagraph() |
add a new paragraph run to this shape
|
void |
clearText() |
unset text from this shape
|
void |
drawContent(java.awt.Graphics2D graphics) |
draw any content within this shape (image, text, etc.).
|
double |
getBottomInset() |
Returns the distance (in points) between the bottom of the text frame
and the bottom of the inscribed rectangle of the shape that contains the text.
|
double |
getLeftInset() |
Returns the distance (in points) between the left edge of the text frame
and the left edge of the inscribed rectangle of the shape that contains
the text.
|
double |
getRightInset() |
Returns the distance (in points) between the right edge of the
text frame and the right edge of the inscribed rectangle of the shape
that contains the text.
|
java.lang.String |
getText() |
|
TextAutofit |
getTextAutofit() |
|
protected abstract org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody |
getTextBody(boolean create) |
|
protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextBodyProperties |
getTextBodyPr() |
|
TextDirection |
getTextDirection() |
|
double |
getTextHeight() |
Compute the cumulative height occupied by the text
|
java.util.List<XSLFTextParagraph> |
getTextParagraphs() |
|
Placeholder |
getTextType() |
|
double |
getTopInset() |
Returns the distance (in points) between the top of the text frame
and the top of the inscribed rectangle of the shape that contains the text.
|
VerticalAlignment |
getVerticalAlignment() |
Returns the type of vertical alignment for the text.
|
boolean |
getWordWrap() |
|
java.util.Iterator<XSLFTextParagraph> |
iterator() |
|
java.awt.geom.Rectangle2D |
resizeToFitText() |
Adjust the size of the shape so it encompasses the text inside it.
|
void |
setBottomInset(double margin) |
Sets the botom margin.
|
void |
setLeftInset(double margin) |
Sets the left margin.
|
void |
setPlaceholder(Placeholder placeholder) |
Specifies that the corresponding shape should be represented by the generating application
as a placeholder.
|
void |
setRightInset(double margin) |
Sets the right margin.
|
void |
setText(java.lang.String text) |
|
void |
setTextAutofit(TextAutofit value) |
Specifies that a shape should be auto-fit to fully contain the text described within it.
|
void |
setTextDirection(TextDirection orientation) |
|
void |
setTopInset(double margin) |
Sets the top margin.
|
void |
setVerticalAlignment(VerticalAlignment anchor) |
Sets the type of vertical alignment for the text.
|
void |
setWordWrap(boolean wrap) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyTransformdraw, getAnchor, getCTPlaceholder, getFillColor, getFlipHorizontal, getFlipVertical, getLineCap, getLineColor, getLineDash, getLineHeadDecoration, getLineHeadLength, getLineHeadWidth, getLineTailDecoration, getLineTailLength, getLineTailWidth, getLineWidth, getNvPr, getRotation, getShadow, getShapeId, getShapeName, getShapeType, getSheet, getSpPr, getSpStyle, getXmlObject, setAnchor, setFillColor, setFlipHorizontal, setFlipVertical, setLineCap, setLineColor, setLineDash, setLineHeadDecoration, setLineHeadLength, setLineHeadWidth, setLineTailDecoration, setLineTailLength, setLineTailWidth, setLineWidth, setRotation, setShapeTypepublic java.util.Iterator<XSLFTextParagraph> iterator()
iterator in interface java.lang.Iterable<XSLFTextParagraph>public java.lang.String getText()
public void clearText()
public void setText(java.lang.String text)
public java.util.List<XSLFTextParagraph> getTextParagraphs()
public XSLFTextParagraph addNewTextParagraph()
public void setVerticalAlignment(VerticalAlignment anchor)
anchor - - the type of alignment.
A null values unsets this property.public VerticalAlignment getVerticalAlignment()
public void setTextDirection(TextDirection orientation)
orientation - vertical orientation of the textpublic TextDirection getTextDirection()
public double getBottomInset()
public double getLeftInset()
public double getRightInset()
public double getTopInset()
public void setBottomInset(double margin)
margin - the bottom margingetBottomInset()public void setLeftInset(double margin)
margin - the left margingetLeftInset()public void setRightInset(double margin)
margin - the right margingetRightInset()public void setTopInset(double margin)
margin - the top margingetTopInset()public boolean getWordWrap()
public void setWordWrap(boolean wrap)
wrap - whether to wrap words within the bounding rectanglepublic void setTextAutofit(TextAutofit value)
value - type of autofitpublic TextAutofit getTextAutofit()
protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextBodyProperties getTextBodyPr()
protected abstract org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody getTextBody(boolean create)
public Placeholder getTextType()
public void setPlaceholder(Placeholder placeholder)
placeholder - public double getTextHeight()
public java.awt.geom.Rectangle2D resizeToFitText()
Rectangle2D that is the bounds of this shape.public void drawContent(java.awt.Graphics2D graphics)
XSLFSimpleShapedrawContent in class XSLFSimpleShapegraphics - the graphics to draw intoCopyright 2018 The Apache Software Foundation or its licensors, as applicable.