|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TextShape<S extends Shape<S,P>,P extends TextParagraph<S,P,?>>
Nested Class Summary | |
---|---|
static class |
TextShape.TextAutofit
Specifies alist of auto-fit types. |
static class |
TextShape.TextDirection
Vertical Text Types |
static class |
TextShape.TextPlaceholder
This enum represents a compromise for the handling of HSLF run types (see org.apache.poi.hslf.record.TextHeaderAtom) and XSLF placeholders (see org.apache.poi.xslf.usermodel.Placeholder). |
Method Summary | |
---|---|
TextRun |
appendText(java.lang.String text,
boolean newParagraph)
Adds the supplied text onto the end of the TextParagraphs, creating a new RichTextRun for it to sit in. |
Insets2D |
getInsets()
|
java.lang.String |
getText()
Returns the text contained in this text frame, which has been made safe for printing and other use. |
TextShape.TextDirection |
getTextDirection()
|
double |
getTextHeight()
Compute the cumulative height occupied by the text |
double |
getTextHeight(java.awt.Graphics2D graphics)
Compute the cumulative height occupied by the text |
java.util.List<? extends TextParagraph<S,P,?>> |
getTextParagraphs()
|
TextShape.TextPlaceholder |
getTextPlaceholder()
|
java.lang.Double |
getTextRotation()
The text rotation can be independent specified from the shape rotation. |
VerticalAlignment |
getVerticalAlignment()
Returns the type of vertical alignment for the text. |
boolean |
getWordWrap()
|
boolean |
isHorizontalCentered()
Returns if the text is centered. |
java.awt.geom.Rectangle2D |
resizeToFitText()
Adjust the size of the shape so it encompasses the text inside it. |
java.awt.geom.Rectangle2D |
resizeToFitText(java.awt.Graphics2D graphics)
Adjust the size of the shape so it encompasses the text inside it. |
void |
setHorizontalCentered(java.lang.Boolean isCentered)
Sets if the paragraphs are horizontal centered |
void |
setInsets(Insets2D insets)
Sets the shape margins |
TextRun |
setText(java.lang.String text)
Sets (overwrites) the current text. |
void |
setTextDirection(TextShape.TextDirection orientation)
sets the vertical orientation |
void |
setTextPlaceholder(TextShape.TextPlaceholder placeholder)
Sets the text placeholder |
void |
setTextRotation(java.lang.Double rotation)
Sets the text rotation. |
void |
setVerticalAlignment(VerticalAlignment vAlign)
Sets the type of vertical alignment for the text. |
void |
setWordWrap(boolean wrap)
|
Methods inherited from interface org.apache.poi.sl.usermodel.SimpleShape |
---|
createHyperlink, getFillColor, getFillStyle, getGeometry, getHyperlink, getLineDecoration, getPlaceholder, getShadow, getShapeType, getStrokeStyle, setFillColor, setPlaceholder, setShapeType, setStrokeStyle |
Methods inherited from interface org.apache.poi.sl.usermodel.Shape |
---|
draw, getAnchor, getParent, getSheet |
Methods inherited from interface org.apache.poi.sl.draw.geom.IAdjustableShape |
---|
getAdjustValue |
Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape |
---|
getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, getSheet, setAnchor, setFlipHorizontal, setFlipVertical, setRotation |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
java.lang.String getText()
TextRun setText(java.lang.String text)
text
- the text string used by this object.
TextRun appendText(java.lang.String text, boolean newParagraph)
text
- the text string to be appended.newParagraph
- if true, a new paragraph will be added,
which will contain the added textjava.util.List<? extends TextParagraph<S,P,?>> getTextParagraphs()
Insets2D getInsets()
void setInsets(Insets2D insets)
insets
- the new shape marginsdouble getTextHeight()
double getTextHeight(java.awt.Graphics2D graphics)
graphics
- a customized graphics context, e.g. which contains font mappings
VerticalAlignment getVerticalAlignment()
void setVerticalAlignment(VerticalAlignment vAlign)
vAlign
- - the type of alignment.
A null
values unsets this property.boolean isHorizontalCentered()
void setHorizontalCentered(java.lang.Boolean isCentered)
isCentered
- true, if the paragraphs are horizontal centered
A null
values unsets this property.boolean getWordWrap()
void setWordWrap(boolean wrap)
wrap
- whether to wrap words within the bounding rectangleTextShape.TextDirection getTextDirection()
void setTextDirection(TextShape.TextDirection orientation)
orientation
- vertical orientation of the textjava.lang.Double getTextRotation()
void setTextRotation(java.lang.Double rotation)
rotation
- the text rotation, or null to unset the rotationvoid setTextPlaceholder(TextShape.TextPlaceholder placeholder)
TextShape.TextPlaceholder getTextPlaceholder()
java.awt.geom.Rectangle2D resizeToFitText()
Rectangle2D
that is the bounds of this shape.java.awt.geom.Rectangle2D resizeToFitText(java.awt.Graphics2D graphics)
graphics
- a customized graphics context, e.g. which contains font mappings
Rectangle2D
that is the bounds of this shape.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |