| Modifier and Type | Class and Description |
|---|---|
| public static enum | TextShape.
Specifies alist of auto-fit types. |
| public static enum | TextShape.
Vertical Text Types |
| public static enum | TextShape.
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). |
| Modifier and Type | Method and Description |
|---|---|
| public TextRun | appendText(String
the text string to be appended. text, boolean if true, a new paragraph will be added,
which will contain the added text newParagraph)Adds the supplied text onto the end of the TextParagraphs, creating a new RichTextRun for it to sit in. |
| public Insets2D | |
| public String | Returns: the text string for this textbox.Returns the text contained in this text frame, which has been made safe for printing and other use. |
| public TextShape. | |
| public double | Returns: the cumulative height occupied by the textCompute the cumulative height occupied by the text |
| public double | Returns: the cumulative height occupied by the texta customized graphics context, e.g. which contains font mappings graphics)Compute the cumulative height occupied by the text |
| public List | |
| public TextShape. | |
| public Double | Returns: text rotation in degrees, returns null if no rotation is givenThe text rotation can be independent specified from the shape rotation. |
| public VerticalAlignment | Returns: the type of vertical alignmentReturns the type of vertical alignment for the text. |
| public boolean | |
| public boolean | Returns: true, if the text anchor is horizontal centeredReturns if the text is centered. |
| public Rectangle2D | Returns: aRectangle2D that is the bounds of this shape.Adjust the size of the shape so it encompasses the text inside it. |
| public Rectangle2D | Returns: aRectangle2D that is the bounds of this shape.a customized graphics context, e.g. which contains font mappings graphics)Adjust the size of the shape so it encompasses the text inside it. |
| public void | setHorizontalCentered(Boolean
true, if the paragraphs are horizontal centered
A isCentered)null values unsets this property.Sets if the paragraphs are horizontal centered |
| public void | |
| public TextRun | |
| public void | setTextDirection(TextShape.
vertical orientation of the text orientationsets the vertical orientation |
| public void | |
| public void | setTextRotation(Double
the text rotation, or null to unset the rotation rotation)Sets the text rotation. |
| public void | setVerticalAlignment(VerticalAlignment
- the type of alignment.
A vAlign)null values unsets this property.Sets the type of vertical alignment for the text. |
| public void |
| appendText | back to summary |
|---|---|
| public TextRun appendText(String text, boolean newParagraph) Adds the supplied text onto the end of the TextParagraphs, creating a new RichTextRun for it to sit in.
| |
| getInsets | back to summary |
|---|---|
public Insets2D getInsets()
| |
| getText | back to summary |
|---|---|
| public String getText() Returns the text contained in this text frame, which has been made safe for printing and other use.
| |
| getTextDirection | back to summary |
|---|---|
public TextShape.
| |
| getTextHeight | back to summary |
|---|---|
| public double getTextHeight() Compute the cumulative height occupied by the text
| |
| getTextHeight | back to summary |
|---|---|
| public double getTextHeight(Graphics2D graphics) Compute the cumulative height occupied by the text
| |
| getTextParagraphs | back to summary |
|---|---|
public List
| |
| getTextPlaceholder | back to summary |
|---|---|
public TextShape.
| |
| getTextRotation | back to summary |
|---|---|
| public Double getTextRotation() The text rotation can be independent specified from the shape rotation. For XSLF this can be an arbitrary degree, for HSLF the degree is given in steps of 90 degrees
| |
| getVerticalAlignment | back to summary |
|---|---|
| public VerticalAlignment getVerticalAlignment() Returns the type of vertical alignment for the text.
| |
| getWordWrap | back to summary |
|---|---|
public boolean getWordWrap()
| |
| isHorizontalCentered | back to summary |
|---|---|
| public boolean isHorizontalCentered() Returns if the text is centered. If true and if the individual paragraph settings allow it, the whole text block will be displayed centered, i.e. its left and right margin will be maximized while still keeping the alignment of the paragraphs
| |
| resizeToFitText | back to summary |
|---|---|
| public Rectangle2D resizeToFitText() Adjust the size of the shape so it encompasses the text inside it.
| |
| resizeToFitText | back to summary |
|---|---|
| public Rectangle2D resizeToFitText(Graphics2D graphics) Adjust the size of the shape so it encompasses the text inside it.
| |
| setHorizontalCentered | back to summary |
|---|---|
| public void setHorizontalCentered(Boolean isCentered) Sets if the paragraphs are horizontal centered
| |
| setInsets | back to summary |
|---|---|
| public void setInsets(Insets2D insets) Sets the shape margins
| |
| setText | back to summary |
|---|---|
| public TextRun setText(String text) Sets (overwrites) the current text. Uses the properties of the first paragraph / textrun. Text paragraphs are split by \\r or \\n. New lines within text run are split by \\u000b | |
| setTextDirection | back to summary |
|---|---|
| public void setTextDirection(TextShape. sets the vertical orientation
| |
| setTextPlaceholder | back to summary |
|---|---|
| public void setTextPlaceholder(TextShape. Sets the text placeholder | |
| setTextRotation | back to summary |
|---|---|
| public void setTextRotation(Double rotation) Sets the text rotation. For XSLF this can ben an arbitrary degree, for HSLF the rotation is rounded to next 90 degree step
| |
| setVerticalAlignment | back to summary |
|---|---|
| public void setVerticalAlignment(VerticalAlignment vAlign) Sets the type of vertical alignment for the text.
| |
| setWordWrap | back to summary |
|---|---|
public void setWordWrap(boolean wrap)
| |
Autofit specofies that a shape should be auto-fit to fully contain the text described within it. Auto-fitting is when text within a shape is scaled in order to contain all the text inside
| Modifier and Type | Field and Description |
|---|---|
| public static final TextShape. | NONE
Specifies that text within the text body should not be auto-fit to the bounding box. |
| public static final TextShape. | NORMAL
Specifies that text within the text body should be normally auto-fit to the bounding box. |
| public static final TextShape. | SHAPE
Specifies that a shape should be auto-fit to fully contain the text described within it. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static TextShape. | |
| public static TextShape. |
| NONE | back to summary |
|---|---|
| public static final TextShape. Specifies that text within the text body should not be auto-fit to the bounding box. Auto-fitting is when text within a text box is scaled in order to remain inside the text box. | |
| NORMAL | back to summary |
|---|---|
| public static final TextShape. Specifies that text within the text body should be normally auto-fit to the bounding box. Autofitting is when text within a text box is scaled in order to remain inside the text box. Example: Consider the situation where a user is building a diagram and needs to have the text for each shape that they are using stay within the bounds of the shape. An easy way this might be done is by using NORMAL autofit | |
| SHAPE | back to summary |
|---|---|
| public static final TextShape. Specifies that a shape should be auto-fit to fully contain the text described within it. Auto-fitting is when text within a shape is scaled in order to contain all the text inside. Example: Consider the situation where a user is building a diagram and needs to have the text for each shape that they are using stay within the bounds of the shape. An easy way this might be done is by using SHAPE autofit | |
| TextAutofit | back to summary |
|---|---|
| private TextAutofit() | |
| valueOf | back to summary |
|---|---|
| public static TextShape. | |
| values | back to summary |
|---|---|
| public static TextShape. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final TextShape. | HORIZONTAL
Horizontal text. |
| public static final TextShape. | STACKED
Determines if all of the text is vertical ("one letter on top of another"). |
| public static final TextShape. | VERTICAL
Vertical orientation. |
| public static final TextShape. | VERTICAL_270
Vertical orientation. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static TextShape. | |
| public static TextShape. |
| HORIZONTAL | back to summary |
|---|---|
| public static final TextShape. Horizontal text. This should be default. | |
| STACKED | back to summary |
|---|---|
| public static final TextShape. Determines if all of the text is vertical ("one letter on top of another"). For HSLF: not supported | |
| VERTICAL | back to summary |
|---|---|
| public static final TextShape. Vertical orientation. (each line is 90 degrees rotated clockwise, so it goes from top to bottom; each next line is to the left from the previous one). | |
| VERTICAL_270 | back to summary |
|---|---|
| public static final TextShape. Vertical orientation. (each line is 270 degrees rotated clockwise, so it goes from bottom to top; each next line is to the right from the previous one). For HSLF: always interpreted by Powerpoint as HORIZONTAL. | |
| TextDirection | back to summary |
|---|---|
| private TextDirection() | |
| valueOf | back to summary |
|---|---|
| public static TextShape. | |
| values | back to summary |
|---|---|
| public static TextShape. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final TextShape. | BODY
Body placeholder shape text |
| public static final TextShape. | CENTER_BODY
Center body placeholder shape text |
| public static final TextShape. | CENTER_TITLE
Center title placeholder shape text |
| public static final TextShape. | HALF_BODY
Half-sized body placeholder shape text |
| public final int | |
| public static final TextShape. | NOTES
Notes placeholder shape text |
| public static final TextShape. | OTHER
Any other text |
| public static final TextShape. | QUARTER_BODY
Quarter-sized body placeholder shape text |
| public static final TextShape. | TITLE
Title placeholder shape text |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static TextShape. | |
| public static boolean | |
| public static TextShape. | |
| public static TextShape. |
| BODY | back to summary |
|---|---|
| public static final TextShape. Body placeholder shape text | |
| CENTER_BODY | back to summary |
|---|---|
| public static final TextShape. Center body placeholder shape text | |
| CENTER_TITLE | back to summary |
|---|---|
| public static final TextShape. Center title placeholder shape text | |
| HALF_BODY | back to summary |
|---|---|
| public static final TextShape. Half-sized body placeholder shape text | |
| nativeId | back to summary |
|---|---|
| public final int nativeId | |
| NOTES | back to summary |
|---|---|
| public static final TextShape. Notes placeholder shape text | |
| OTHER | back to summary |
|---|---|
| public static final TextShape. Any other text | |
| QUARTER_BODY | back to summary |
|---|---|
| public static final TextShape. Quarter-sized body placeholder shape text | |
| TITLE | back to summary |
|---|---|
| public static final TextShape. Title placeholder shape text | |
| TextPlaceholder | back to summary |
|---|---|
| private TextPlaceholder(int nativeId) | |
| fromNativeId | back to summary |
|---|---|
| public static TextShape. | |
| isTitle | back to summary |
|---|---|
| public static boolean isTitle(int nativeId) | |
| valueOf | back to summary |
|---|---|
| public static TextShape. | |
| values | back to summary |
|---|---|
| public static TextShape. | |