@Beta public class XDDFTextParagraph extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
XDDFTextParagraph(org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph paragraph,
XDDFTextBody parent) |
Modifier and Type | Method and Description |
---|---|
XDDFRunProperties |
addAfterLastRunProperties() |
XDDFRunProperties |
addDefaultRunProperties() |
XDDFTabStop |
addTabStop() |
XDDFTextRun |
appendField(java.lang.String id,
java.lang.String type,
java.lang.String text)
Append a new text field.
|
XDDFTextRun |
appendLineBreak()
Append a line break.
|
XDDFTextRun |
appendRegularRun(java.lang.String text)
Append a new run of text.
|
int |
countTabStops() |
protected <R> java.util.Optional<R> |
findDefinedParagraphProperty(java.util.function.Predicate<org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties> isSet,
java.util.function.Function<org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties,R> getter) |
protected <R> java.util.Optional<R> |
findDefinedRunProperty(java.util.function.Predicate<org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties> isSet,
java.util.function.Function<org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties,R> getter) |
XDDFRunProperties |
getAfterLastRunProperties() |
XDDFColor |
getBulletColor() |
XDDFFont |
getBulletFont() |
XDDFParagraphBulletProperties |
getBulletProperties() |
XDDFBulletSize |
getBulletSize()
Returns the bullet size that is to be used within a paragraph.
|
XDDFBulletStyle |
getBulletStyle() |
XDDFRunProperties |
getDefaultRunProperties() |
java.lang.Double |
getDefaultTabSize() |
FontAlignment |
getFontAlignment()
Returns where vertically on a line of text the actual words are
positioned.
|
java.lang.Double |
getIndentation() |
int |
getIndentationLevel()
Returns the paragraph indentation level.
|
XDDFSpacing |
getLineSpacing()
Returns the vertical line spacing that is to be used within a paragraph.
|
java.lang.Double |
getMarginLeft() |
java.lang.Double |
getMarginRight() |
XDDFParagraphBulletProperties |
getOrCreateBulletProperties() |
XDDFTextBody |
getParentBody() |
XDDFSpacing |
getSpaceAfter()
The amount of vertical white space after the paragraph.
|
XDDFSpacing |
getSpaceBefore()
The amount of vertical white space before the paragraph.
|
XDDFTabStop |
getTabStop(int index) |
java.util.List<XDDFTabStop> |
getTabStops() |
java.lang.String |
getText() |
TextAlignment |
getTextAlignment()
Returns the alignment that is applied to the paragraph.
|
java.util.List<XDDFTextRun> |
getTextRuns() |
boolean |
hasEastAsianLineBreak() |
boolean |
hasHangingPunctuation() |
boolean |
hasLatinLineBreak() |
XDDFTabStop |
insertTabStop(int index) |
boolean |
isRightToLeft() |
java.util.Iterator<XDDFTextRun> |
iterator() |
void |
removeTabStop(int index) |
void |
setAfterLastRunProperties(XDDFRunProperties properties) |
void |
setBulletColor(XDDFColor color)
Set the color to be used on bullet characters within a given paragraph.
|
void |
setBulletColorFollowText()
Specifies the color to be used on bullet characters has to follow text
color within a given paragraph.
|
void |
setBulletFont(XDDFFont font)
Set the font to be used on bullet characters within a given paragraph.
|
void |
setBulletFontFollowText()
Specifies the font to be used on bullet characters has to follow text
font within a given paragraph.
|
void |
setBulletSize(XDDFBulletSize size)
Sets the bullet size that is to be used within a paragraph.
|
void |
setBulletStyle(XDDFBulletStyle style) |
void |
setDefaultRunProperties(XDDFRunProperties properties) |
void |
setDefaultTabSize(java.lang.Double points)
Specifies the default size for a tab character within this paragraph.
|
void |
setEastAsianLineBreak(java.lang.Boolean value) |
void |
setFontAlignment(FontAlignment align)
Determines where vertically on a line of text the actual words are
positioned.
|
void |
setHangingPunctuation(java.lang.Boolean value) |
void |
setIndentation(java.lang.Double points)
Specifies the indentation size that will be applied to the first line of
text in the paragraph.
|
void |
setIndentationLevel(java.lang.Integer level)
Specifies the paragraph indentation level, between 1 and 9.
|
void |
setLatinLineBreak(java.lang.Boolean value) |
void |
setLineSpacing(XDDFSpacing linespacing)
This element specifies the vertical line spacing that is to be used
within a paragraph.
|
void |
setMarginLeft(java.lang.Double points)
Specifies the left margin of the paragraph.
|
void |
setMarginRight(java.lang.Double points)
Specifies the right margin of the paragraph.
|
void |
setRightToLeft(java.lang.Boolean value) |
void |
setSpaceAfter(XDDFSpacing spaceAfter)
Set the amount of vertical white space that will be present after the
paragraph.
|
void |
setSpaceBefore(XDDFSpacing spaceBefore)
Set the amount of vertical white space that will be present before the
paragraph.
|
void |
setText(java.lang.String text) |
void |
setTextAlignment(TextAlignment align)
Specifies the alignment that is to be applied to the paragraph.
|
@Internal protected XDDFTextParagraph(org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph paragraph, XDDFTextBody parent)
public void setText(java.lang.String text)
public java.lang.String getText()
public XDDFTextBody getParentBody()
public java.util.List<XDDFTextRun> getTextRuns()
public java.util.Iterator<XDDFTextRun> iterator()
public XDDFTextRun appendLineBreak()
public XDDFTextRun appendField(java.lang.String id, java.lang.String type, java.lang.String text)
public XDDFTextRun appendRegularRun(java.lang.String text)
public int getIndentationLevel()
public void setIndentationLevel(java.lang.Integer level)
level
- new indentation level for the paragraph.
Use null
to unset the indentation level.public TextAlignment getTextAlignment()
public void setTextAlignment(TextAlignment align)
align
- text alignmentpublic FontAlignment getFontAlignment()
public void setFontAlignment(FontAlignment align)
align
- text font alignmentpublic java.lang.Double getIndentation()
public void setIndentation(java.lang.Double points)
points
- the indentation in points. The value null
unsets
the indentation for this paragraph.
public java.lang.Double getMarginLeft()
public void setMarginLeft(java.lang.Double points)
points
- the margin in points. The value null
unsets the
left margin for this paragraph.
public java.lang.Double getMarginRight()
public void setMarginRight(java.lang.Double points)
points
- the margin in points. The value null
unsets the
right margin for this paragraph.
public java.lang.Double getDefaultTabSize()
public void setDefaultTabSize(java.lang.Double points)
points
- the default tab size in points. The value null
unsets the default tab size for this paragraph.public XDDFSpacing getLineSpacing()
If line spacing is a percentage of normal line height, result is instance of XDDFSpacingPercent. If line spacing is expressed in points, result is instance of XDDFSpacingPoints.
public void setLineSpacing(XDDFSpacing linespacing)
If spacing is instance of XDDFSpacingPercent, then line spacing is a percentage of normal line height. If spacing is instance of XDDFSpacingPoints, then line spacing is expressed in points.
Examples:
// spacing will be 120% of the size of the largest text on each line
paragraph.setLineSpacing(new XDDFSpacingPercent(120));
// spacing will be 200% of the size of the largest text on each line
paragraph.setLineSpacing(new XDDFSpacingPercent(200));
// spacing will be 48 points
paragraph.setLineSpacing(new XDDFSpacingPoints(48.0));
linespacing
- the vertical line spacingpublic XDDFSpacing getSpaceBefore()
If spacing is a percentage of normal line height, result is instance of XDDFSpacingPercent. If spacing is expressed in points, result is instance of XDDFSpacingPoints.
public void setSpaceBefore(XDDFSpacing spaceBefore)
If spacing is instance of XDDFSpacingPercent, then spacing is a percentage of normal line height. If spacing is instance of XDDFSpacingPoints, then spacing is expressed 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(new XDDFSpacingPercent(200));
// The spacing will be a size of 48 points
paragraph.setSpaceBefore(new XDDFSpacingPoints(48.0));
spaceBefore
- the vertical white space before the paragraph.public XDDFSpacing getSpaceAfter()
If spacing is a percentage of normal line height, result is instance of XDDFSpacingPercent. If spacing is expressed in points, result is instance of XDDFSpacingPoints.
public void setSpaceAfter(XDDFSpacing spaceAfter)
If spacing is instance of XDDFSpacingPercent, then spacing is a percentage of normal line height. If spacing is instance of XDDFSpacingPoints, then spacing is expressed 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(new XDDFSpacingPercent(200));
// The spacing will be a size of 48 points
paragraph.setSpaceAfter(new XDDFSpacingPoints(48.0));
spaceAfter
- the vertical white space after the paragraph.public XDDFColor getBulletColor()
null
value means to use the text font color.public void setBulletColor(XDDFColor color)
color
- the bullet colorpublic void setBulletColorFollowText()
public XDDFFont getBulletFont()
null
value means to use the text font font.public void setBulletFont(XDDFFont font)
font
- the bullet fontpublic void setBulletFontFollowText()
public XDDFBulletSize getBulletSize()
If returned value is instance of XDDFBulletSizeFollowText, then bullet size is text size; If returned value is instance of XDDFBulletSizePercent, then bullet size is a percentage of the font size; If returned value is instance of XDDFBulletSizePoints, then bullet size is specified in points.
public void setBulletSize(XDDFBulletSize size)
If given value is instance of XDDFBulletSizeFollowText, then bullet size is text size; If given value is instance of XDDFBulletSizePercent, then bullet size is a percentage of the font size; If given value is instance of XDDFBulletSizePoints, then bullet size is specified in points.
size
- the bullet size specificationpublic XDDFBulletStyle getBulletStyle()
public void setBulletStyle(XDDFBulletStyle style)
public boolean hasEastAsianLineBreak()
public void setEastAsianLineBreak(java.lang.Boolean value)
public boolean hasLatinLineBreak()
public void setLatinLineBreak(java.lang.Boolean value)
public boolean hasHangingPunctuation()
public void setHangingPunctuation(java.lang.Boolean value)
public boolean isRightToLeft()
public void setRightToLeft(java.lang.Boolean value)
public XDDFTabStop addTabStop()
public XDDFTabStop insertTabStop(int index)
public void removeTabStop(int index)
public XDDFTabStop getTabStop(int index)
public java.util.List<XDDFTabStop> getTabStops()
public int countTabStops()
public XDDFParagraphBulletProperties getOrCreateBulletProperties()
public XDDFParagraphBulletProperties getBulletProperties()
public XDDFRunProperties addDefaultRunProperties()
public XDDFRunProperties getDefaultRunProperties()
public void setDefaultRunProperties(XDDFRunProperties properties)
public XDDFRunProperties addAfterLastRunProperties()
public XDDFRunProperties getAfterLastRunProperties()
public void setAfterLastRunProperties(XDDFRunProperties properties)
protected <R> java.util.Optional<R> findDefinedParagraphProperty(java.util.function.Predicate<org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties> isSet, java.util.function.Function<org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties,R> getter)
protected <R> java.util.Optional<R> findDefinedRunProperty(java.util.function.Predicate<org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties> isSet, java.util.function.Function<org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties,R> getter)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.