TextRun.FieldType, TextRun.TextCap
Constructor and Description |
---|
HSLFTextRun(HSLFTextParagraph parentParagraph)
Create a new wrapper around a rich text string
|
Modifier and Type | Method and Description |
---|---|
HSLFHyperlink |
createHyperlink()
Creates a new hyperlink and assigns it to this text run.
(创建一个新的超链接并将其分配给此文本运行。)
|
TextPropCollection |
getCharacterStyle() |
TextRun.FieldType |
getFieldType()
Experimental method to determine the field type, e.g.
(确定字段类型的实验方法,例如)
|
PaintStyle.SolidPaint |
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) 的便捷方法)
|
int |
getFontIndex()
Gets the font index
(获取字体索引)
|
HSLFFontInfo |
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
(返回直接在此文本运行中设置或从幻灯片布局中给出的字体大小)
|
HSLFHyperlink |
getHyperlink()
Return the associated hyperlink
(返回关联的超链接)
|
int |
getLength()
Get the length of the text
(获取文本长度)
|
HSLFTextParagraph |
getParagraph() |
byte |
getPitchAndFamily() |
java.lang.String |
getRawText()
Fetch the text, in raw storage form
(以原始存储形式获取文本)
|
int |
getSuperscript()
Gets the subscript/superscript option
(获取下标/上标选项)
|
TextRun.TextCap |
getTextCap() |
HSLFTextParagraph |
getTextParagraph() |
boolean |
isBold() |
boolean |
isEmbossed()
Is this text embossed?
(这个文字是浮雕的吗?)
|
boolean |
isItalic() |
boolean |
isShadowed()
Does the text have a shadow?
(文字有阴影吗?)
|
boolean |
isStrikethrough() |
boolean |
isSubscript() |
boolean |
isSuperscript() |
boolean |
isUnderlined() |
void |
setBold(boolean bold)
Sets the bold state
(设置粗体状态)
|
void |
setCharacterStyle(TextPropCollection characterStyle) |
void |
setCharTextPropVal(java.lang.String propName, java.lang.Integer val)
Sets the value of the given Paragraph TextProp, add if required
(设置给定段落 TextProp 的值,如果需要,添加)
|
void |
setEmbossed(boolean flag)
Is this text embossed?
(这个文字是浮雕的吗?)
|
void |
setFontColor(java.awt.Color color)
Sets the (solid) font color - convenience function
(设置(实心)字体颜色 - 便利功能)
|
void |
setFontColor(int bgr)
Sets color of the text, as a int bgr.
(设置文本的颜色,作为 int bgr。)
|
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 |
setFontIndex(int idx)
Sets the font index
(设置字体索引)
|
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 |
setShadowed(boolean flag)
Does the text have a shadow?
(文字有阴影吗?)
|
void |
setStrikethrough(boolean flag)
Sets the strikethrough state
(设置删除线状态)
|
void |
setSuperscript(int val)
Sets the subscript/superscript option
(设置下标/上标选项)
|
void |
setText(java.lang.String text)
Change the text
(更改文本)
|
void |
setUnderlined(boolean underlined)
Sets the underlined state
(设置下划线状态)
|
void |
updateSheet()
Supply the SlideShow we belong to
(提供我们所属的幻灯片)
|
public HSLFTextRun(HSLFTextParagraph parentParagraph)
parentParagraph
- the parent paragraph
(parentParagraph - 父段落)
public TextPropCollection getCharacterStyle()
public void setCharacterStyle(TextPropCollection characterStyle)
public void updateSheet()
public int getLength()
public java.lang.String getRawText()
getRawText
in interface
TextRun
(接口 TextRun 中的 getRawText)
public void setText(java.lang.String text)
public void setCharTextPropVal(java.lang.String propName, java.lang.Integer val)
propName
- The name of the Paragraph TextProp
(propName - 段落 TextProp 的名称)
val
- The value to set for the TextProp
(val - 为 TextProp 设置的值)
public boolean isBold()
public void setBold(boolean bold)
TextRun
public boolean isItalic()
public void setItalic(boolean italic)
TextRun
public boolean isUnderlined()
isUnderlined
in interface
TextRun
(接口TextRun中的isUnderlined)
public void setUnderlined(boolean underlined)
TextRun
setUnderlined
in interface
TextRun
(接口 TextRun 中的 setUnderlined)
underlined
- set to true for underlined text, false for no underlining
(underlined - 为带下划线的文本设置为 true,为无下划线设置为 false)
public boolean isShadowed()
public void setShadowed(boolean flag)
public boolean isEmbossed()
public void setEmbossed(boolean flag)
public boolean isStrikethrough()
isStrikethrough
in interface
TextRun
(接口 TextRun 中的 isStrikethrough)
public void setStrikethrough(boolean flag)
TextRun
setStrikethrough
in interface
TextRun
(接口 TextRun 中的 setStrikethrough)
flag
- set to true for stroked text, false for no stroking
(flag - 设置为 true 表示有描边的文本,设置为 false 表示没有描边)
public int getSuperscript()
public void setSuperscript(int val)
val
- the percentage of the font size. If the value is positive, it is superscript, otherwise it is subscript
(val - 字体大小的百分比。如果值为正,则为上标,否则为下标)
public java.lang.Double getFontSize()
TextRun
getFontSize
in interface
TextRun
(TextRun 界面中的 getFontSize)
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 int getFontIndex()
public void setFontIndex(int idx)
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 HSLFFontInfo 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 PaintStyle.SolidPaint 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 setFontColor(int bgr)
Color
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 HSLFTextParagraph getTextParagraph()
public TextRun.TextCap getTextCap()
getTextCap
in interface
TextRun
(TextRun接口中的getTextCap)
public boolean isSubscript()
isSubscript
in interface
TextRun
(接口 TextRun 中的 isSubscript)
public boolean isSuperscript()
isSuperscript
in interface
TextRun
(TextRun 界面中的 isSuperscript)
public byte getPitchAndFamily()
getPitchAndFamily
in interface
TextRun
(接口 TextRun 中的 getPitchAndFamily)
public HSLFHyperlink getHyperlink()
TextRun
getHyperlink
in interface
TextRun
(接口 TextRun 中的 getHyperlink)
public HSLFHyperlink createHyperlink()
TextRun
createHyperlink
in interface
TextRun
(接口 TextRun 中的 createHyperlink)
public TextRun.FieldType getFieldType()
TextRun
getFieldType
in interface
TextRun
(接口 TextRun 中的 getFieldType)
null
if text run is not a field
(如果 text run 不是字段,则字段类型或 null)
public HSLFTextParagraph getParagraph()
getParagraph
in interface
TextRun
(接口 TextRun 中的 getParagraph)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.