TextRun.FieldType, TextRun.TextCap
Modifier | Constructor and Description |
---|---|
protected |
XSLFTextRun(org.apache.xmlbeans.XmlObject r, XSLFTextParagraph p) |
Modifier and Type | Method and Description |
---|---|
XSLFHyperlink |
createHyperlink()
Creates a new hyperlink and assigns it to this text run.
(创建一个新的超链接并将其分配给此文本运行。)
|
double |
getCharacterSpacing() |
TextRun.FieldType |
getFieldType()
Experimental method to determine the field type, e.g.
(确定字段类型的实验方法,例如)
|
PaintStyle |
getFontColor()
Returns the font color.
(返回字体颜色。)
|
java.lang.String |
getFontFamily()
Get the font family - convenience method for
TextRun.getFontInfo(FontGroup)
(获取字体系列 - TextRun.getFontInfo(FontGroup) 的便捷方法)
|
java.lang.String |
getFontFamily(FontGroup fontGroup)
Get the font family - convenience method for
TextRun.getFontInfo(FontGroup)
(获取字体系列 - TextRun.getFontInfo(FontGroup) 的便捷方法)
|
FontInfo |
getFontInfo(FontGroup fontGroup)
Get the font info for the given font group
(获取给定字体组的字体信息)
|
java.lang.Double |
getFontSize()
Returns the font size which is either set directly on this text run or given from the slide layout
(返回直接在此文本运行中设置或从幻灯片布局中给出的字体大小)
|
XSLFHyperlink |
getHyperlink()
Return the associated hyperlink
(返回关联的超链接)
|
XSLFTextParagraph |
getParagraph() |
byte |
getPitchAndFamily() |
java.lang.String |
getRawText() |
org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties |
getRPr(boolean create)
Return the character properties
(返回字符属性)
|
TextRun.TextCap |
getTextCap() |
org.apache.xmlbeans.XmlObject |
getXmlObject()
Return the text run xmlbeans object.
(返回文本运行 xmlbeans 对象。)
|
boolean |
isBold() |
boolean |
isItalic() |
boolean |
isStrikethrough() |
boolean |
isSubscript() |
boolean |
isSuperscript() |
boolean |
isUnderlined() |
void |
setBaselineOffset(double baselineOffset)
Set the baseline for both the superscript and subscript fonts.
(为上标和下标字体设置基线。)
|
void |
setBold(boolean bold)
Sets the bold state
(设置粗体状态)
|
void |
setCharacterSpacing(double spc)
Set the spacing between characters within a text run.
(设置文本运行中字符之间的间距。)
|
void |
setFontColor(java.awt.Color color)
Sets the (solid) font color - convenience function
(设置(实心)字体颜色 - 便利功能)
|
void |
setFontColor(PaintStyle color)
Sets the font color
(设置字体颜色)
|
void |
setFontFamily(java.lang.String typeface)
Specifies the typeface, or name of the font that is to be used for this text run - convenience method for calling
TextRun.setFontInfo(FontInfo, FontGroup) with just a font name
(指定要用于此文本运行的字体或字体名称 - 仅使用字体名称调用 TextRun.setFontInfo(FontInfo, FontGroup) 的便捷方法)
|
void |
setFontFamily(java.lang.String typeface, FontGroup fontGroup)
Specifies the typeface, or name of the font that is to be used for this text run - convenience method for calling
TextRun.setFontInfo(FontInfo, FontGroup) with just a font name
(指定要用于此文本运行的字体或字体名称 - 仅使用字体名称调用 TextRun.setFontInfo(FontInfo, FontGroup) 的便捷方法)
|
void |
setFontInfo(FontInfo fontInfo, FontGroup fontGroup)
Specifies the font to be used for this text run.
(指定要用于此文本运行的字体。)
|
void |
setFontSize(java.lang.Double fontSize)
Sets the font size directly on this text run, if null is given, the font size defaults to the values given from the slide layout
(直接在此文本运行上设置字体大小,如果给出 null,则字体大小默认为幻灯片布局中给出的值)
|
void |
setItalic(boolean italic)
Sets the italic state
(设置斜体状态)
|
void |
setStrikethrough(boolean strike)
Sets the strikethrough state
(设置删除线状态)
|
void |
setSubscript(boolean flag)
Set whether the text in this run is formatted as subscript.
(设置本次运行中的文本是否格式化为下标。)
|
void |
setSuperscript(boolean flag)
Set whether the text in this run is formatted as superscript.
(设置本次运行中的文本是否格式化为上标。)
|
void |
setText(java.lang.String text) |
void |
setUnderlined(boolean underline)
Sets the underlined state
(设置下划线状态)
|
java.lang.String |
toString() |
protected XSLFTextRun(org.apache.xmlbeans.XmlObject r, XSLFTextParagraph p)
public java.lang.String getRawText()
getRawText
in interface
TextRun
(接口 TextRun 中的 getRawText)
public void setText(java.lang.String text)
@Internal public org.apache.xmlbeans.XmlObject getXmlObject()
CTTextField
,
CTTextLineBreak
or usually a
CTRegularTextRun
(返回文本运行 xmlbeans 对象。根据文本运行的类型,这可以是 CTTextField、CTTextLineBreak 或通常是 CTRegularTextRun)
public void setFontColor(java.awt.Color color)
TextRun
setFontColor
in interface
TextRun
(TextRun 界面中的 setFontColor)
color
- the color
(颜色 - 颜色)
public void setFontColor(PaintStyle color)
TextRun
setFontColor
in interface
TextRun
(TextRun 界面中的 setFontColor)
color
- the color
(颜色 - 颜色)
DrawPaint.createSolidPaint(Color)
public PaintStyle getFontColor()
TextRun
PaintStyle.SolidPaint
, but but also other classes are possible
(返回字体颜色。这通常返回 PaintStyle.SolidPaint,但其他类也是可能的)
getFontColor
in interface
TextRun
(TextRun界面中的getFontColor)
DrawPaint.getPaint(java.awt.Graphics2D, PaintStyle)
,
PaintStyle.SolidPaint.getSolidColor()
,
DrawPaint.applyColorTransform(ColorStyle)
public void setFontSize(java.lang.Double fontSize)
TextRun
setFontSize
in interface
TextRun
(接口 TextRun 中的 setFontSize)
fontSize
- font size in points, if null the underlying fontsize will be unset
(fontSize - 以磅为单位的字体大小,如果为 null,则底层字体大小将被取消设置)
public java.lang.Double getFontSize()
TextRun
getFontSize
in interface
TextRun
(TextRun 界面中的 getFontSize)
public double getCharacterSpacing()
public void setCharacterSpacing(double spc)
The spacing is specified in points. Positive values will cause the text to expand, negative values to condense.
(设置文本运行中字符之间的间距。间距以磅为单位指定。正值将导致文本扩展,负值将导致压缩。)spc
- character spacing in points.
(spc - 以点为单位的字符间距。)
public void setFontFamily(java.lang.String typeface)
TextRun
TextRun.setFontInfo(FontInfo, FontGroup)
with just a font name
(指定要用于此文本运行的字体或字体名称 - 仅使用字体名称调用 TextRun.setFontInfo(FontInfo, FontGroup) 的便捷方法)
setFontFamily
in interface
TextRun
(TextRun 界面中的 setFontFamily)
typeface
- the font to apply to this text run. The value of
null
removes the run specific font setting, so the default setting is activated again.
(typeface - 应用于此文本运行的字体。 null 的值会删除运行特定的字体设置,因此会再次激活默认设置。)
public void setFontFamily(java.lang.String typeface, FontGroup fontGroup)
TextRun
TextRun.setFontInfo(FontInfo, FontGroup)
with just a font name
(指定要用于此文本运行的字体或字体名称 - 仅使用字体名称调用 TextRun.setFontInfo(FontInfo, FontGroup) 的便捷方法)
setFontFamily
in interface
TextRun
(TextRun 界面中的 setFontFamily)
typeface
- the font to apply to this text run. The value of
null
removes the run specific font setting, so the default setting is activated again.
(typeface - 应用于此文本运行的字体。 null 的值会删除运行特定的字体设置,因此会再次激活默认设置。)
fontGroup
- the font group, i.e. the range of glpyhs to be covered. if
null
, the font group matching the first character will be returned
(fontGroup - 字体组,即要覆盖的 glpyhs 的范围。如果为null,则返回匹配第一个字符的字体组)
public void setFontInfo(FontInfo fontInfo, FontGroup fontGroup)
TextRun
setFontInfo
in interface
TextRun
(接口 TextRun 中的 setFontInfo)
fontInfo
- the font to apply to this text run. The value of
null
removes the run specific font setting, so the default setting is activated again.
(fontInfo - 应用于此文本运行的字体。 null 的值会删除运行特定的字体设置,因此会再次激活默认设置。)
fontGroup
- the font group, i.e. the range of glpyhs to be covered. defaults to latin, if
null
.
(fontGroup - 字体组,即要覆盖的 glpyhs 的范围。如果为 null,则默认为拉丁语。)
public java.lang.String getFontFamily()
TextRun
TextRun.getFontInfo(FontGroup)
(获取字体系列 - TextRun.getFontInfo(FontGroup) 的便捷方法)
getFontFamily
in interface
TextRun
(接口 TextRun 中的 getFontFamily)
public java.lang.String getFontFamily(FontGroup fontGroup)
TextRun
TextRun.getFontInfo(FontGroup)
(获取字体系列 - TextRun.getFontInfo(FontGroup) 的便捷方法)
getFontFamily
in interface
TextRun
(接口 TextRun 中的 getFontFamily)
fontGroup
- the font group, i.e. the range of glpyhs to be covered. if
null
, the font group matching the first character will be returned
(fontGroup - 字体组,即要覆盖的 glpyhs 的范围。如果为null,则返回匹配第一个字符的字体组)
public FontInfo getFontInfo(FontGroup fontGroup)
TextRun
getFontInfo
in interface
TextRun
(TextRun接口中的getFontInfo)
fontGroup
- the font group, i.e. the range of glpyhs to be covered. if
null
, the font group matching the first character will be returned
(fontGroup - 字体组,即要覆盖的 glpyhs 的范围。如果为null,则返回匹配第一个字符的字体组)
null
if not set
(字体信息或 null 如果未设置)
public byte getPitchAndFamily()
getPitchAndFamily
in interface
TextRun
(接口 TextRun 中的 getPitchAndFamily)
public void setStrikethrough(boolean strike)
TextRun
setStrikethrough
in interface
TextRun
(接口 TextRun 中的 setStrikethrough)
strike
- set to true for stroked text, false for no stroking
(罢工 - 设置为 true 用于描边文本,设置为 false 为无描边)
public boolean isStrikethrough()
isStrikethrough
in interface
TextRun
(接口 TextRun 中的 isStrikethrough)
public boolean isSuperscript()
isSuperscript
in interface
TextRun
(TextRun 界面中的 isSuperscript)
public void setBaselineOffset(double baselineOffset)
The size is specified using a percentage. Positive values indicate superscript, negative values indicate subscript.
(为上标和下标字体设置基线。使用百分比指定大小。正值表示上标,负值表示下标。)public void setSuperscript(boolean flag)
setBaselineOffset(double)
public void setSubscript(boolean flag)
setBaselineOffset(double)
public boolean isSubscript()
isSubscript
in interface
TextRun
(接口 TextRun 中的 isSubscript)
public TextRun.TextCap getTextCap()
getTextCap
in interface
TextRun
(TextRun接口中的getTextCap)
public void setBold(boolean bold)
TextRun
public boolean isBold()
public void setItalic(boolean italic)
TextRun
public boolean isItalic()
public void setUnderlined(boolean underline)
TextRun
setUnderlined
in interface
TextRun
(接口 TextRun 中的 setUnderlined)
underline
- set to true for underlined text, false for no underlining
(underline - 为带下划线的文本设置为 true,为无下划线设置为 false)
public boolean isUnderlined()
isUnderlined
in interface
TextRun
(接口TextRun中的isUnderlined)
@Internal public org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties getRPr(boolean create)
create
- if true, create an empty character properties object if it doesn't exist
(create - 如果为真,则创建一个空的字符属性对象(如果它不存在))
public java.lang.String toString()
toString
in class
java.lang.Object
public XSLFHyperlink createHyperlink()
TextRun
createHyperlink
in interface
TextRun
(接口 TextRun 中的 createHyperlink)
public XSLFHyperlink getHyperlink()
TextRun
getHyperlink
in interface
TextRun
(接口 TextRun 中的 getHyperlink)
public TextRun.FieldType getFieldType()
TextRun
getFieldType
in interface
TextRun
(接口 TextRun 中的 getFieldType)
null
if text run is not a field
(如果 text run 不是字段,则字段类型或 null)
public XSLFTextParagraph getParagraph()
getParagraph
in interface
TextRun
(接口 TextRun 中的 getParagraph)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.