@Beta public class XSLFTextParagraph extends java.lang.Object implements TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
TextParagraph.BulletStyle, TextParagraph.FontAlign, TextParagraph.TextAlign
Modifier and Type | Method and Description |
---|---|
XSLFTextRun |
addLineBreak()
Insert a line break
(插入换行符)
|
XSLFTextRun |
addNewTextRun()
Add a new run of text
(添加新的文本运行)
|
void |
addTabStop(double value) |
void |
addTabStops(double positionInPoints, TabStop.TabStopType tabStopType)
Set the
TabStop collection
(设置 TabStop 集合)
|
void |
clearTabStops()
Removes the tabstops of this paragraphs.
(删除此段落的制表位。)
|
AutoNumberingScheme |
getAutoNumberingScheme() |
java.lang.Integer |
getAutoNumberingStartAt() |
java.lang.String |
getBulletCharacter() |
java.lang.String |
getBulletFont() |
PaintStyle |
getBulletFontColor() |
java.lang.Double |
getBulletFontSize()
Returns the bullet size that is to be used within a paragraph.
(返回要在段落中使用的项目符号大小。)
|
TextParagraph.BulletStyle |
getBulletStyle() |
java.lang.String |
getDefaultFontFamily() |
java.lang.Double |
getDefaultFontSize() |
org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties |
getDefaultMasterStyle() |
java.lang.Double |
getDefaultTabSize() |
TextParagraph.FontAlign |
getFontAlign()
Returns the font alignment that is applied to the paragraph.
(返回应用于段落的字体对齐方式。)
|
java.lang.Double |
getIndent() |
int |
getIndentLevel() |
java.lang.Double |
getLeftMargin() |
java.lang.Double |
getLineSpacing()
Returns the vertical line spacing that is to be used within a paragraph.
(返回要在段落中使用的垂直行距。)
|
XSLFTextShape |
getParentShape() |
java.lang.Double |
getRightMargin()
Specifies the right margin of the paragraph.
(指定段落的右边距。)
|
java.lang.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:
(段落后的垂直空白量这可以通过两种不同的方式指定,百分比间距和字体点间距:)
|
java.lang.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:
(段落前的垂直空白量这可以通过两种不同的方式指定,百分比间距和字体点间距:)
|
double |
getTabStop(int idx) |
java.util.List<XSLFTabStop> |
getTabStops()
Get the
TabStops - the list can't be and it's entries shouldn't be modified.
(获取 TabStops - 列表不能,它的条目不应该被修改。)
|
java.lang.String |
getText() |
TextParagraph.TextAlign |
getTextAlign()
Returns the alignment that is applied to the paragraph.
(返回应用于段落的对齐方式。)
|
java.util.List<XSLFTextRun> |
getTextRuns()
Fetch the text runs that are contained within this block of text
(获取包含在此文本块中的文本运行)
|
org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph |
getXmlObject() |
boolean |
isBullet()
Returns whether this paragraph has bullets
(返回此段落是否有项目符号)
|
boolean |
isHeaderOrFooter()
Convenience method to determine if this text paragraph is part of the slide header or footer
(确定此文本段落是幻灯片页眉或页脚的一部分的便捷方法)
|
java.util.Iterator<XSLFTextRun> |
iterator() |
protected XSLFTextRun |
newTextRun(org.openxmlformats.schemas.drawingml.x2006.main.CTTextLineBreak r) |
protected XSLFTextRun |
newTextRun(org.apache.xmlbeans.XmlObject r)
Helper method to allow subclasses to provide their own text run
(允许子类提供自己的文本运行的辅助方法)
|
void |
setBullet(boolean flag) |
void |
setBulletAutoNumber(AutoNumberingScheme scheme, int startAt)
Specifies that automatic numbered bullet points should be applied to this paragraph
(指定应将自动编号的项目符号应用于此段落)
|
void |
setBulletCharacter(java.lang.String str) |
void |
setBulletFont(java.lang.String typeface) |
void |
setBulletFontColor(java.awt.Color color) |
void |
setBulletFontColor(PaintStyle color)
Set the color to be used on bullet characters within a given paragraph.
(设置要在给定段落中的项目符号字符上使用的颜色。)
|
void |
setBulletFontSize(double bulletSize)
Sets the bullet size that is to be used within a paragraph.
(设置要在段落中使用的项目符号大小。)
|
void |
setBulletStyle(java.lang.Object... styles)
Sets the bullet styles.
(设置项目符号样式。)
|
void |
setFontAlign(TextParagraph.FontAlign align)
Specifies the font alignment that is to be applied to the paragraph.
(指定要应用于段落的字体对齐方式。)
|
void |
setIndent(java.lang.Double indent)
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(java.lang.Double leftMargin)
Specifies the left margin of the paragraph.
(指定段落的左边距。)
|
void |
setLineSpacing(java.lang.Double lineSpacing)
This element specifies the vertical line spacing that is to be used within a paragraph.
(此元素指定要在段落中使用的垂直行距。)
|
void |
setRightMargin(java.lang.Double rightMargin) |
void |
setSpaceAfter(java.lang.Double spaceAfter)
Set the amount of vertical white space that will be present after the paragraph.
(设置段落后出现的垂直空白量。)
|
void |
setSpaceBefore(java.lang.Double spaceBefore)
Set the amount of vertical white space that will be present before the paragraph.
(设置段落之前将出现的垂直空白量。)
|
void |
setTextAlign(TextParagraph.TextAlign align)
Specifies the alignment that is to be applied to the paragraph.
(指定要应用于段落的对齐方式。)
|
java.lang.String |
toString() |
public java.lang.String getText()
@Internal public org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph getXmlObject()
public XSLFTextShape getParentShape()
getParentShape
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getParentShape
public java.util.List<XSLFTextRun> getTextRuns()
TextParagraph
getTextRuns
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getTextRuns
public java.util.Iterator<XSLFTextRun> iterator()
iterator
in interface
java.lang.Iterable<XSLFTextRun>
(接口 java.lang.Iterable 中的迭代器
public XSLFTextRun addNewTextRun()
public XSLFTextRun addLineBreak()
public TextParagraph.TextAlign getTextAlign()
TextParagraph
TextParagraph.TextAlign.LEFT
then.
(返回应用于段落的对齐方式。如果省略此属性,则返回 null。用户代码可以隐含 TextParagraph.TextAlign.LEFT 的值。)
getTextAlign
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getTextAlign
public void setTextAlign(TextParagraph.TextAlign align)
TextParagraph
TextParagraph.TextAlign
.
(指定要应用于段落的对齐方式。可能的值包括左、右、居中、对齐和分布,请参阅 TextParagraph.TextAlign。)
setTextAlign
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 setTextAlign
align
- text align
(对齐 - 文本对齐)
public TextParagraph.FontAlign getFontAlign()
TextParagraph
TextParagraph.FontAlign.AUTO
(返回应用于段落的字体对齐方式。如果省略该属性,则返回 null,用户代码可以隐含 TextParagraph.FontAlign.AUTO 的值)
getFontAlign
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getFontAlign
public void setFontAlign(TextParagraph.FontAlign align)
TextParagraph.FontAlign
.
(指定要应用于段落的字体对齐方式。可能的值包括 auto、top、center、baseline 和 bottom。请参阅 TextParagraph.FontAlign。)
align
- font align
(align - 字体对齐)
public java.lang.String getBulletFont()
public void setBulletFont(java.lang.String typeface)
public java.lang.String getBulletCharacter()
public void setBulletCharacter(java.lang.String str)
public PaintStyle getBulletFontColor()
null
value means to use the text font color.
(给定段落中项目符号字符的颜色。空值表示使用文本字体颜色。)
public void setBulletFontColor(java.awt.Color color)
public void setBulletFontColor(PaintStyle color)
color
- the bullet color
(color - 子弹颜色)
public java.lang.Double getBulletFontSize()
If bulletSize >= 0, then bulletSize is a percentage of the font size. If bulletSize < 0, then it specifies the size in points
(返回要在段落中使用的项目符号大小。这可以通过两种不同的方式指定,百分比间距和字体点间距: 如果 bulletSize >= 0,则 bulletSize 是字体大小的百分比。如果bulletSize < 0,则它以磅为单位指定大小)public void setBulletFontSize(double bulletSize)
If bulletSize >= 0, then bulletSize is a percentage of the font size. If bulletSize < 0, then it specifies the size in points
(设置要在段落中使用的项目符号大小。这可以通过两种不同的方式指定,百分比间距和字体点间距: 如果 bulletSize >= 0,则 bulletSize 是字体大小的百分比。如果bulletSize < 0,则它以磅为单位指定大小)public AutoNumberingScheme getAutoNumberingScheme()
public java.lang.Integer getAutoNumberingStartAt()
public void setIndent(java.lang.Double indent)
TextParagraph
setIndent
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 setIndent
indent
- the indent (in points) applied to the first line of text in the paragraph
(indent - 应用于段落中第一行文本的缩进(以磅为单位))
public java.lang.Double getIndent()
getIndent
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getIndent
public void setLeftMargin(java.lang.Double leftMargin)
TextParagraph
setLeftMargin
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 setLeftMargin
leftMargin
- the left margin (in points) or null to unset
(leftMargin - 左边距(以磅为单位)或 null 取消设置)
public java.lang.Double getLeftMargin()
getLeftMargin
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getLeftMargin
public void setRightMargin(java.lang.Double rightMargin)
setRightMargin
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 setRightMargin
rightMargin
- the right margin (in points) of the paragraph
(rightMargin - 段落的右边距(以磅为单位))
public java.lang.Double getRightMargin()
TextParagraph
getRightMargin
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getRightMargin
public java.lang.Double getDefaultTabSize()
getDefaultTabSize
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getDefaultTabSize
public double getTabStop(int idx)
public void addTabStop(double value)
public void setLineSpacing(java.lang.Double lineSpacing)
TextParagraph
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);
(此元素指定要在段落中使用的垂直行距。这可以通过两种不同的方式指定,百分比间距和字体点间距: 如果行间距 >= 0,则行间距是正常行高的百分比 如果行间距 < 0,行间距的绝对值是以点为单位的间距示例://间距将是每行段落上最大文本大小的 120%.setLineSpacing(120); // 间距将是每行最大文本大小的 200%。paragraph.setLineSpacing(200); // 间距为 48 点 paragraph.setLineSpacing(-48.0);)
setLineSpacing
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 setLineSpacing
lineSpacing
- the vertical line spacing
(lineSpacing - 垂直行距)
public java.lang.Double getLineSpacing()
TextParagraph
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
(返回要在段落中使用的垂直行距。这可以通过两种不同的方式指定,百分比间距和字体点间距: 如果行间距 >= 0,则行间距是正常行高的百分比。如果linespacing < 0,则linespacing的绝对值是以点为单位的间距)getLineSpacing
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getLineSpacing
public void setSpaceBefore(java.lang.Double spaceBefore)
TextParagraph
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);
(设置段落之前将出现的垂直空白量。此空间以百分比或点数指定:如果 spaceBefore >= 0,则空间是法线高度的百分比。如果 spaceBefore < 0,则 linepacing 的绝对值是以磅为单位的间距示例: // 段落将被格式化为在段落文本之前有一个间距。 // 间距将是每行最大文本大小的 200%。paragraph.setSpaceBefore(200); // 间距将是 48 磅的大小 paragraph.setSpaceBefore(-48.0);)
setSpaceBefore
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 setSpaceBefore
spaceBefore
- the vertical white space before the paragraph, null to unset
(spaceBefore - 段落前的垂直空白,null 取消设置)
public java.lang.Double getSpaceBefore()
TextParagraph
If spaceBefore >= 0, then space is a percentage of normal line height. If spaceBefore < 0, the absolute value in points
(段落前的垂直空白量 这可以通过两种不同的方式指定,百分比间距和字体点间距: 如果 spaceBefore >= 0,则间距是正常行高的百分比。如果 spaceBefore < 0,则以点为单位的绝对值)getSpaceBefore
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getSpaceBefore
public void setSpaceAfter(java.lang.Double spaceAfter)
TextParagraph
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);
(设置段落后出现的垂直空白量。此空间以百分比或点数指定:如果 spaceAfter >= 0,则空间是法线高度的百分比。如果 spaceAfter < 0,则 linepacing 的绝对值是以磅为单位的间距示例: // 段落将被格式化为在段落文本之后有一个间距。 // 间距将是每行最大文本大小的 200%。paragraph.setSpaceAfter(200); // 间距将是 48 磅的大小 paragraph.setSpaceAfter(-48.0);)
setSpaceAfter
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口TextParagraph中的setSpaceAfter
spaceAfter
- the vertical white space after the paragraph, null to unset
(spaceAfter - 段落后的垂直空白,null 取消设置)
public java.lang.Double getSpaceAfter()
TextParagraph
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
(段落后的垂直空白量 这可以通过两种不同的方式指定,百分比间距和字体点间距: 如果 spaceBefore >= 0,则间距是正常行高的百分比。如果 spaceBefore < 0,则 linepacing 的绝对值是以磅为单位的间距)getSpaceAfter
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口TextParagraph中的getSpaceAfter
public void setIndentLevel(int level)
TextParagraph
setIndentLevel
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 setIndentLevel
level
- the level (0 ... 4)
(level - 级别 (0 ... 4))
public int getIndentLevel()
getIndentLevel
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getIndentLevel
public boolean isBullet()
public void setBullet(boolean flag)
flag
- whether text in this paragraph has bullets
(flag - 本段中的文本是否有项目符号)
public void setBulletAutoNumber(AutoNumberingScheme scheme, int startAt)
scheme
- type of auto-numbering
(方案 - 自动编号的类型)
startAt
- the number that will start number for a given sequence of automatically numbered bullets (1-based).
(startAt - 给定自动编号项目符号序列的起始编号(从 1 开始)。)
public java.lang.String toString()
toString
in class
java.lang.Object
@Internal public org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties getDefaultMasterStyle()
null
if there are no master slides or the master slides do not contain a text paragraph
(母版样式文本段落属性,如果没有母版幻灯片或母版幻灯片不包含文本段落,则为 null)
public java.lang.Double getDefaultFontSize()
getDefaultFontSize
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getDefaultFontSize
public java.lang.String getDefaultFontFamily()
getDefaultFontFamily
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getDefaultFontFamily
public TextParagraph.BulletStyle getBulletStyle()
getBulletStyle
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getBulletStyle
null
then no bullets are used
(段落的项目符号样式,如果为 null 则不使用项目符号)
public void setBulletStyle(java.lang.Object... styles)
TextParagraph
setBulletStyle
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 setBulletStyle
public java.util.List<XSLFTabStop> getTabStops()
TextParagraph
TabStops
- 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.
(获取 TabStops - 列表不能,它的条目不应该被修改。与其他属性相反,如果该属性未在正常幻灯片级别上定义,即不合并不同级别的制表位,则此方法不会级联到主工作表。)
getTabStops
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 getTabStops
null
if no tabstops are defined
(tabstop 集合,如果没有定义 tabstop,则返回 null)
public void addTabStops(double positionInPoints, TabStop.TabStopType tabStopType)
TextParagraph
TabStop
collection
(设置 TabStop 集合)
addTabStops
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 addTabStops
public void clearTabStops()
TextParagraph
clearTabStops
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(界面 TextParagraph 中的 clearTabStops
public boolean isHeaderOrFooter()
TextParagraph
isHeaderOrFooter
in interface
TextParagraph<XSLFShape,XSLFTextParagraph,XSLFTextRun>
(接口 TextParagraph 中的 isHeaderOrFooter
protected XSLFTextRun newTextRun(org.apache.xmlbeans.XmlObject r)
r
- the xml reference
(r - xml 引用)
protected XSLFTextRun newTextRun(org.openxmlformats.schemas.drawingml.x2006.main.CTTextLineBreak r)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.