Interface TextParagraph<S extends Shape<S,P>,P extends TextParagraph<S,P,T>,T extends TextRun>
- All Superinterfaces:
Iterable<T>
- All Known Implementing Classes:
HSLFTextParagraph
,XSLFTextParagraph
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static enum
static enum
Specifies a list of text alignment types -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTabStops
(double positionInPoints, TabStop.TabStopType tabStopType) Set theTabStop
collectionvoid
Removes the tabstops of this paragraphs.Returns the font alignment that is applied to the paragraph.int
Returns the vertical line spacing that is to be used within a paragraph.Specifies the right margin of the paragraph.The amount of vertical white space after the paragraph This may be specified in two different ways, percentage spacing and font point spacing:The amount of vertical white space before the paragraph This may be specified in two different ways, percentage spacing and font point spacing:Get theTabStops
- the list can't be and it's entries shouldn't be modified.Returns the alignment that is applied to the paragraph.Fetch the text runs that are contained within this block of textboolean
Convenience method to determine if this text paragraph is part of the slide header or footervoid
setBulletStyle
(Object... styles) Sets the bullet styles.void
Specifies the indent size that will be applied to the first line of text in the paragraph.void
setIndentLevel
(int level) Specifies the particular level text properties that this paragraph will follow.void
setLeftMargin
(Double leftMargin) Specifies the left margin of the paragraph.void
setLineSpacing
(Double lineSpacing) This element specifies the vertical line spacing that is to be used within a paragraph.void
setRightMargin
(Double rightMargin) void
setSpaceAfter
(Double spaceAfter) Set the amount of vertical white space that will be present after the paragraph.void
setSpaceBefore
(Double spaceBefore) Set the amount of vertical white space that will be present before the paragraph.void
Specifies the alignment that is to be applied to the paragraph.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getSpaceBefore
Double getSpaceBefore()The amount of vertical white space before the paragraph This may be specified in two different ways, percentage spacing and font point spacing:If spaceBefore >= 0, then space is a percentage of normal line height. If spaceBefore invalid input: '<' 0, the absolute value in points
- Returns:
- the vertical white space before the paragraph, or null if unset
-
setSpaceBefore
Set the amount of vertical white space that will be present before the paragraph. This space is specified in either percentage or points:If spaceBefore >= 0, then space is a percentage of normal line height. If spaceBefore invalid input: '<' 0, the absolute value of linespacing is the spacing in points
Examples:// The paragraph will be formatted to have a spacing before the paragraph text. // The spacing will be 200% of the size of the largest text on each line paragraph.setSpaceBefore(200); // The spacing will be a size of 48 points paragraph.setSpaceBefore(-48.0);
- Parameters:
spaceBefore
- the vertical white space before the paragraph, null to unset
-
getSpaceAfter
Double getSpaceAfter()The amount of vertical white space after the paragraph This may be specified in two different ways, percentage spacing and font point spacing:If spaceBefore >= 0, then space is a percentage of normal line height. If spaceBefore invalid input: '<' 0, the absolute value of linespacing is the spacing in points
- Returns:
- the vertical white space after the paragraph or null, if unset
-
setSpaceAfter
Set the amount of vertical white space that will be present after the paragraph. This space is specified in either percentage or points:If spaceAfter >= 0, then space is a percentage of normal line height. If spaceAfter invalid input: '<' 0, the absolute value of linespacing is the spacing in points
Examples:// The paragraph will be formatted to have a spacing after the paragraph text. // The spacing will be 200% of the size of the largest text on each line paragraph.setSpaceAfter(200); // The spacing will be a size of 48 points paragraph.setSpaceAfter(-48.0);
- Parameters:
spaceAfter
- the vertical white space after the paragraph, null to unset
-
getLeftMargin
Double getLeftMargin()- Returns:
- the left margin (in points) of the paragraph or null, if unset
-
setLeftMargin
Specifies the left margin of the paragraph. This is specified in addition to the text body inset and applies only to this text paragraph. That is the text body Inset and the LeftMargin attributes are additive with respect to the text position.- Parameters:
leftMargin
- the left margin (in points) or null to unset
-
getRightMargin
Double getRightMargin()Specifies the right margin of the paragraph. This is specified in addition to the text body inset and applies only to this text paragraph. That is the text body Inset and the RightMargin attributes are additive with respect to the text position. The right margin is not support and therefore ignored by the HSLF implementation.- Returns:
- the right margin (in points) of the paragraph or null, if unset
-
setRightMargin
- Parameters:
rightMargin
- the right margin (in points) of the paragraph
-
getIndent
Double getIndent()- Returns:
- the indent (in points) applied to the first line of text in the paragraph. or null, if unset
-
setIndent
Specifies the indent size that will be applied to the first line of text in the paragraph.- Parameters:
indent
- the indent (in points) applied to the first line of text in the paragraph
-
getIndentLevel
int getIndentLevel()- Returns:
- the text level of this paragraph (0-based). Default is 0.
-
setIndentLevel
void setIndentLevel(int level) Specifies the particular level text properties that this paragraph will follow. The value for this attribute formats the text according to the corresponding level paragraph properties defined in the SlideMaster.- Parameters:
level
- the level (0 ... 4)
-
getLineSpacing
Double getLineSpacing()Returns the vertical line spacing that is to be used within a paragraph. This may be specified in two different ways, percentage spacing and font point spacing:If linespacing >= 0, then linespacing is a percentage of normal line height. If linespacing invalid input: '<' 0, the absolute value of linespacing is the spacing in points
- Returns:
- the vertical line spacing or null, if unset
-
setLineSpacing
This element specifies the vertical line spacing that is to be used within a paragraph. This may be specified in two different ways, percentage spacing and font point spacing:If linespacing >= 0, then linespacing is a percentage of normal line height If linespacing invalid input: '<' 0, the absolute value of linespacing is the spacing in points
Examples:// spacing will be 120% of the size of the largest text on each line paragraph.setLineSpacing(120); // spacing will be 200% of the size of the largest text on each line paragraph.setLineSpacing(200); // spacing will be 48 points paragraph.setLineSpacing(-48.0);
- Parameters:
lineSpacing
- the vertical line spacing
-
getDefaultFontFamily
String getDefaultFontFamily() -
getDefaultFontSize
Double getDefaultFontSize()- Returns:
- the default font size, in case its not set in the textrun or null, if unset
-
getTextAlign
TextParagraph.TextAlign getTextAlign()Returns the alignment that is applied to the paragraph. If this attribute is omitted, then null is returned. User code can imply the valueTextParagraph.TextAlign.LEFT
then.- Returns:
- alignment that is applied to the paragraph
-
setTextAlign
Specifies the alignment that is to be applied to the paragraph. Possible values for this include left, right, centered, justified and distributed, seeTextParagraph.TextAlign
.- Parameters:
align
- text align
-
getFontAlign
TextParagraph.FontAlign getFontAlign()Returns the font alignment that is applied to the paragraph. If this attribute is omitted, then null is return, user code can imply the a value ofTextParagraph.FontAlign.AUTO
- Returns:
- alignment that is applied to the paragraph
-
getBulletStyle
TextParagraph.BulletStyle getBulletStyle()- Returns:
- the bullet style of the paragraph, if
null
then no bullets are used
-
setBulletStyle
Sets the bullet styles. If no styles are given, the bullets are omitted. Possible attributes are integer/double (bullet size), Color (bullet color), character (bullet character), string (bullet font), AutoNumberingScheme- Parameters:
styles
-
-
getDefaultTabSize
Double getDefaultTabSize()- Returns:
- the default size for a tab character within this paragraph in points, null if unset
-
getParentShape
-
getTextRuns
Fetch the text runs that are contained within this block of text -
getTabStops
Get theTabStops
- the list can't be and it's entries shouldn't be modified. Opposed to other properties, this method is not cascading to the master sheet, if the property is not defined on the normal slide level, i.e. the tabstops on different levels aren't merged.- Returns:
- the tabstop collection or
null
if no tabstops are defined - Since:
- POI 4.0.0
-
addTabStops
Set theTabStop
collection- Parameters:
tabStops
- theTabStop
collection- Since:
- POI 4.0.0
-
clearTabStops
void clearTabStops()Removes the tabstops of this paragraphs. This doesn't affect inherited tabstops, e.g. inherited by the slide master- Since:
- POI 4.0.0
-