Top Inners Methods
org.apache.poi.sl.usermodel

public Interface TextParagraph<S extends Shape<S, P>, P extends TextParagraph<S, P, T>, T extends TextRun>

extends Iterable<T extends TextRun>
Imports
java.awt.Color, java.util.List

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
public static enum
public static enum
TextParagraph.TextAlign

Specifies a list of text alignment types

Method Summary

Modifier and TypeMethod and Description
public void
addTabStops(double positionInPoints, TabStop.TabStopType tabStopType)

Set the TabStop collection

public void
clearTabStops()

Removes the tabstops of this paragraphs.

public TextParagraph.BulletStyle

Returns:

the bullet style of the paragraph, if null then no bullets are used
getBulletStyle
()

public String
public Double

Returns:

the default font size, in case its not set in the textrun or null, if unset
getDefaultFontSize
()

public Double

Returns:

the default size for a tab character within this paragraph in points, null if unset
getDefaultTabSize
()

public TextParagraph.FontAlign

Returns:

alignment that is applied to the paragraph
getFontAlign
()

Returns the font alignment that is applied to the paragraph.

public Double

Returns:

the indent (in points) applied to the first line of text in the paragraph. or null, if unset
getIndent
()

public int

Returns:

the text level of this paragraph (0-based). Default is 0.
getIndentLevel
()

public Double

Returns:

the left margin (in points) of the paragraph or null, if unset
getLeftMargin
()

public Double

Returns:

the vertical line spacing or null, if unset
getLineSpacing
()

Returns the vertical line spacing that is to be used within a paragraph.

public TextShape<S, P>
public Double

Returns:

the right margin (in points) of the paragraph or null, if unset
getRightMargin
()

Specifies the right margin of the paragraph.

public Double

Returns:

the vertical white space after the paragraph or null, if unset
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.

public Double

Returns:

the vertical white space before the paragraph, or null if unset
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.

public List<? extends TabStop>

Returns:

the tabstop collection or null if no tabstops are defined
getTabStops
()

Get the TabStops - the list can't be and its entries shouldn't be modified.

public TextParagraph.TextAlign

Returns:

alignment that is applied to the paragraph
getTextAlign
()

Returns the alignment that is applied to the paragraph.

public List<T>
getTextRuns()

Fetch the text runs that are contained within this block of text

public boolean

Returns:

true if this paragraph is part of a header or footer placeholder
isHeaderOrFooter
()

Convenience method to determine if this text paragraph is part of the slide header or footer

public void
setBulletStyle(Object... styles)

Sets the bullet styles.

public void
setIndent(Double
the indent (in points) applied to the first line of text in the paragraph
indent
)

Specifies the indent size that will be applied to the first line of text in the paragraph.

public void
setIndentLevel(int
the level (0 ... 4)
level
)

Specifies the particular level text properties that this paragraph will follow.

public void
setLeftMargin(Double
the left margin (in points) or null to unset
leftMargin
)

Specifies the left margin of the paragraph.

public void
setLineSpacing(Double
the vertical line spacing
lineSpacing
)

This element specifies the vertical line spacing that is to be used within a paragraph.

public void
setRightMargin(Double
the right margin (in points) of the paragraph
rightMargin
)

public void
setSpaceAfter(Double
the vertical white space after the paragraph, null to unset
spaceAfter
)

Set the amount of vertical white space that will be present after the paragraph.

public void
setSpaceBefore(Double
the vertical white space before the paragraph, null to unset
spaceBefore
)

Set the amount of vertical white space that will be present before the paragraph.

public void
setTextAlign(TextParagraph.TextAlign
text align
align
)

Specifies the alignment that is to be applied to the paragraph.

Inherited from java.lang.Iterable:
forEachiteratorspliterator

Method Detail

addTabStopsback to summary
public void addTabStops(double positionInPoints, TabStop.TabStopType tabStopType)

Set the TabStop collection

Since
POI 4.0.0
clearTabStopsback to summary
public 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
getBulletStyleback to summary
public TextParagraph.BulletStyle getBulletStyle()
Returns:TextParagraph.BulletStyle

the bullet style of the paragraph, if null then no bullets are used

getDefaultFontFamilyback to summary
public String getDefaultFontFamily()
getDefaultFontSizeback to summary
public Double getDefaultFontSize()
Returns:Double

the default font size, in case its not set in the textrun or null, if unset

getDefaultTabSizeback to summary
public Double getDefaultTabSize()
Returns:Double

the default size for a tab character within this paragraph in points, null if unset

getFontAlignback to summary
public 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 of FontAlign#AUTO

Returns:TextParagraph.FontAlign

alignment that is applied to the paragraph

getIndentback to summary
public Double getIndent()
Returns:Double

the indent (in points) applied to the first line of text in the paragraph. or null, if unset

getIndentLevelback to summary
public int getIndentLevel()
Returns:int

the text level of this paragraph (0-based). Default is 0.

getLeftMarginback to summary
public Double getLeftMargin()
Returns:Double

the left margin (in points) of the paragraph or null, if unset

getLineSpacingback to summary
public 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 < 0, the absolute value of linespacing is the spacing in points

Returns:Double

the vertical line spacing or null, if unset

getParentShapeback to summary
public TextShape<S, P> getParentShape()
getRightMarginback to summary
public 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:Double

the right margin (in points) of the paragraph or null, if unset

getSpaceAfterback to summary
public 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 < 0, the absolute value of linespacing is the spacing in points

Returns:Double

the vertical white space after the paragraph or null, if unset

getSpaceBeforeback to summary
public 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 < 0, the absolute value in points

Returns:Double

the vertical white space before the paragraph, or null if unset

getTabStopsback to summary
public List<? extends TabStop> getTabStops()

Get the TabStops - the list can't be and its 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:List<? extends TabStop>

the tabstop collection or null if no tabstops are defined

Annotations
@SuppressWarnings:java:S1452
Since
POI 4.0.0
getTextAlignback to summary
public 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 value org.apache.poi.sl.usermodel.TextParagraph.TextAlign#LEFT then.

Returns:TextParagraph.TextAlign

alignment that is applied to the paragraph

getTextRunsback to summary
public List<T> getTextRuns()

Fetch the text runs that are contained within this block of text

isHeaderOrFooterback to summary
public boolean isHeaderOrFooter()

Convenience method to determine if this text paragraph is part of the slide header or footer

Returns:boolean

true if this paragraph is part of a header or footer placeholder

Since
POI 3.15-beta2
setBulletStyleback to summary
public void setBulletStyle(Object... styles)

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

setIndentback to summary
public void setIndent(Double indent)

Specifies the indent size that will be applied to the first line of text in the paragraph.

Parameters
indent:Double

the indent (in points) applied to the first line of text in the paragraph

setIndentLevelback to summary
public 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:int

the level (0 ... 4)

setLeftMarginback to summary
public void setLeftMargin(Double leftMargin)

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:Double

the left margin (in points) or null to unset

setLineSpacingback to summary
public void setLineSpacing(Double lineSpacing)

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 < 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:Double

the vertical line spacing

setRightMarginback to summary
public void setRightMargin(Double rightMargin)
Parameters
rightMargin:Double

the right margin (in points) of the paragraph

setSpaceAfterback to summary
public void setSpaceAfter(Double spaceAfter)

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 < 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:Double

the vertical white space after the paragraph, null to unset

setSpaceBeforeback to summary
public void setSpaceBefore(Double spaceBefore)

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 < 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:Double

the vertical white space before the paragraph, null to unset

setTextAlignback to summary
public void setTextAlign(TextParagraph.TextAlign align)

Specifies the alignment that is to be applied to the paragraph. Possible values for this include left, right, centered, justified and distributed, see org.apache.poi.sl.usermodel.TextParagraph.TextAlign.

Parameters
align:TextParagraph.TextAlign

text align

org.apache.poi.sl.usermodel back to summary

public Interface TextParagraph.BulletStyle


Method Summary

Modifier and TypeMethod and Description
public AutoNumberingScheme
public Integer
getAutoNumberingStartAt()

Index (1-based) of the first auto number value, or null if auto numbering scheme wasn't assigned.

public String
public String
public PaintStyle

Returns:

the color of bullet characters within a given paragraph. A null value means to use the text font color.
getBulletFontColor
()

public Double

Returns:

the bullet point font size
getBulletFontSize
()

The bullet point font size If bulletFontSize >= 0, then space is a percentage of normal line height.

public void
setBulletFontColor(Color color)

Convenience function to set a solid color

public void

Method Detail

getAutoNumberingSchemeback to summary
public AutoNumberingScheme getAutoNumberingScheme()
getAutoNumberingStartAtback to summary
public Integer getAutoNumberingStartAt()

Index (1-based) of the first auto number value, or null if auto numbering scheme wasn't assigned.

getBulletCharacterback to summary
public String getBulletCharacter()
getBulletFontback to summary
public String getBulletFont()
getBulletFontColorback to summary
public PaintStyle getBulletFontColor()
Returns:PaintStyle

the color of bullet characters within a given paragraph. A null value means to use the text font color.

getBulletFontSizeback to summary
public Double getBulletFontSize()

The bullet point font size If bulletFontSize >= 0, then space is a percentage of normal line height. If bulletFontSize < 0, the absolute value in points

Returns:Double

the bullet point font size

setBulletFontColorback to summary
public void setBulletFontColor(Color color)

Convenience function to set a solid color

setBulletFontColorback to summary
public void setBulletFontColor(PaintStyle color)
org.apache.poi.sl.usermodel back to summary

public final Enum TextParagraph.FontAlign

extends Enum<TextParagraph.FontAlign>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final TextParagraph.FontAlign
public static final TextParagraph.FontAlign
BASELINE

Place characters on font baseline.

public static final TextParagraph.FontAlign
BOTTOM

Characters are anchored to the very bottom of a single line.

public static final TextParagraph.FontAlign
CENTER

Characters centered within line height.

public static final TextParagraph.FontAlign
TOP

Characters hang from top of line height.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TextParagraph.FontAlign
public static TextParagraph.FontAlign[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AUTOback to summary
public static final TextParagraph.FontAlign AUTO
BASELINEback to summary
public static final TextParagraph.FontAlign BASELINE

Place characters on font baseline. Also known as "Roman"

BOTTOMback to summary
public static final TextParagraph.FontAlign BOTTOM

Characters are anchored to the very bottom of a single line. This is different than BASELINE because of letters such as "g", "q", and "y". Also known as "UpholdFixed"

CENTERback to summary
public static final TextParagraph.FontAlign CENTER

Characters centered within line height.

TOPback to summary
public static final TextParagraph.FontAlign TOP

Characters hang from top of line height. Also known as "Hanging"

Constructor Detail

FontAlignback to summary
private FontAlign()

Method Detail

valueOfback to summary
public static TextParagraph.FontAlign valueOf(String name)
valuesback to summary
public static TextParagraph.FontAlign[] values()
org.apache.poi.sl.usermodel back to summary

public final Enum TextParagraph.TextAlign

extends Enum<TextParagraph.TextAlign>
Class Inheritance

Specifies a list of text alignment types

Field Summary

Modifier and TypeField and Description
public static final TextParagraph.TextAlign
CENTER

For horizontal text, centered.

public static final TextParagraph.TextAlign
DIST

Distribute space between characters.

public static final TextParagraph.TextAlign
JUSTIFY

Align text so that it is justified across the whole line.

public static final TextParagraph.TextAlign
JUSTIFY_LOW

Kashida justify low.

public static final TextParagraph.TextAlign
LEFT

For horizontal text, left aligned.

public static final TextParagraph.TextAlign
RIGHT

For horizontal text, right aligned.

public static final TextParagraph.TextAlign
THAI_DIST

Thai distribution justification.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TextParagraph.TextAlign
public static TextParagraph.TextAlign[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CENTERback to summary
public static final TextParagraph.TextAlign CENTER

For horizontal text, centered. For vertical text, middle aligned.

DISTback to summary
public static final TextParagraph.TextAlign DIST

Distribute space between characters.

JUSTIFYback to summary
public static final TextParagraph.TextAlign JUSTIFY

Align text so that it is justified across the whole line. It is smart in the sense that it will not justify sentences which are short For horizontal text, flush left and right. For vertical text, flush top and bottom.

JUSTIFY_LOWback to summary
public static final TextParagraph.TextAlign JUSTIFY_LOW

Kashida justify low.

LEFTback to summary
public static final TextParagraph.TextAlign LEFT

For horizontal text, left aligned. For vertical text, top aligned.

RIGHTback to summary
public static final TextParagraph.TextAlign RIGHT

For horizontal text, right aligned. For vertical text, bottom aligned.

THAI_DISTback to summary
public static final TextParagraph.TextAlign THAI_DIST

Thai distribution justification.

Constructor Detail

TextAlignback to summary
private TextAlign()

Method Detail

valueOfback to summary
public static TextParagraph.TextAlign valueOf(String name)
valuesback to summary
public static TextParagraph.TextAlign[] values()