@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.
(指定段落缩进级别,介于 1 和 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.
(level - 段落的新缩进级别。使用 null 取消设置缩进级别。)
public TextAlignment getTextAlignment()
public void setTextAlignment(TextAlignment align)
align
- text alignment
(align - 文本对齐)
public FontAlignment getFontAlignment()
public void setFontAlignment(FontAlignment align)
align
- text font alignment
(align - 文本字体对齐)
public 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.
(点 - 以点为单位的默认选项卡大小。值 null 取消设置此段落的默认选项卡大小。)
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.
(返回要在段落中使用的垂直行距。这可以通过两种不同的方式指定,百分比间距或字体点间距: 如果行间距是正常行高的百分比,则结果是 XDDFSpacingPercent 的实例。如果行间距以点表示,则结果是 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));
(此元素指定要在段落中使用的垂直行距。这可以通过两种不同的方式指定,百分比间距或字体点间距:如果间距是 XDDFSpacingPercent 的实例,则行间距是正常行高的百分比。如果间距是 XDDFSpacingPoints 的实例,则行间距以点表示。示例: // 间距将是每行最大文本大小的 120% 段落.setLineSpacing(new XDDFSpacingPercent(120)); // 间距将是每行最大文本大小的 200%。paragraph.setLineSpacing(new XDDFSpacingPercent(200)); // 间距将是 48 点 paragraph.setLineSpacing(new XDDFSpacingPoints(48.0));)
linespacing
- the vertical line spacing
(linepacing - 垂直行距)
public 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.
(段落前的垂直空白量。这可以通过两种不同的方式指定,百分比间距或字体点间距: 如果间距是正常行高的百分比,则结果是 XDDFSpacingPercent 的实例。如果间距以点表示,则结果是 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));
(设置段落之前将出现的垂直空白量。这可以通过两种不同的方式指定,百分比间距或字体点间距:如果间距是 XDDFSpacingPercent 的实例,则间距是正常行高的百分比。如果间距是 XDDFSpacingPoints 的实例,则间距以点表示。示例: // 段落将被格式化为在段落文本之前有一个间距。 // 间距将是每行最大文本大小的 200% 段落.setSpaceBefore(new XDDFSpacingPercent(200)); // 间距将是 48 磅的大小 paragraph.setSpaceBefore(new XDDFSpacingPoints(48.0));)
spaceBefore
- the vertical white space before the paragraph.
(spaceBefore - 段落前的垂直空白。)
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.
(段落后的垂直空白量。这可以通过两种不同的方式指定,百分比间距或字体点间距: 如果间距是正常行高的百分比,则结果是 XDDFSpacingPercent 的实例。如果间距以点表示,则结果是 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));
(设置段落后出现的垂直空白量。这可以通过两种不同的方式指定,百分比间距或字体点间距:如果间距是 XDDFSpacingPercent 的实例,则间距是正常行高的百分比。如果间距是 XDDFSpacingPoints 的实例,则间距以点表示。示例: // 段落将被格式化为在段落文本之后有一个间距。 // 间距将是每行最大文本大小的 200% 段落.setSpaceAfter(new XDDFSpacingPercent(200)); // 间距将是 48 磅的大小 paragraph.setSpaceAfter(new XDDFSpacingPoints(48.0));)
spaceAfter
- the vertical white space after the paragraph.
(spaceAfter - 段落后的垂直空白。)
public XDDFColor getBulletColor()
null
value means to use the text font color.
(给定段落中项目符号字符的颜色。空值表示使用文本字体颜色。)
public void setBulletColor(XDDFColor color)
color
- the bullet color
(color - 子弹颜色)
public void setBulletColorFollowText()
public XDDFFont getBulletFont()
null
value means to use the text font font.
(给定段落中项目符号字符的字体。空值表示使用文本字体字体。)
public void setBulletFont(XDDFFont font)
font
- the bullet font
(font - 项目符号字体)
public 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.
(返回要在段落中使用的项目符号大小。这可以通过三种不同的方式指定,遵循文本大小、百分比大小和字体点大小: 如果返回值是 XDDFBulletSizeFollowText 的实例,则项目符号大小是文本大小;如果返回值为 XDDFBulletSizePercent 的实例,则子弹大小是字体大小的百分比;如果返回值是 XDDFBulletSizePoints 的实例,则以磅为单位指定项目符号大小。)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.
(设置要在段落中使用的项目符号大小。这可以通过三种不同的方式指定,遵循文本大小、百分比大小和字体点大小: 如果给定值是 XDDFBulletSizeFollowText 的实例,则项目符号大小是文本大小;如果给定值是 XDDFBulletSizePercent 的实例,则项目符号大小是字体大小的百分比;如果给定值是 XDDFBulletSizePoints 的实例,则项目符号大小以磅为单位指定。)size
- the bullet size specification
(size - 子弹尺寸规格)
public 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.