public interface TextRun
Modifier and Type | Interface and Description |
---|---|
static class |
TextRun.FieldType
Type of placeholder fields
|
static class |
TextRun.TextCap
Type of text capitals
|
Modifier and Type | Method and Description |
---|---|
Hyperlink<?,?> |
createHyperlink()
Creates a new hyperlink and assigns it to this text run.
|
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
getFontInfo(FontGroup) |
java.lang.String |
getFontFamily(FontGroup fontGroup)
Get the font family - convenience method for
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
|
Hyperlink<?,?> |
getHyperlink()
Return the associated hyperlink
|
TextParagraph<?,?,?> |
getParagraph() |
byte |
getPitchAndFamily() |
java.lang.String |
getRawText() |
TextRun.TextCap |
getTextCap() |
boolean |
isBold() |
boolean |
isItalic() |
boolean |
isStrikethrough() |
boolean |
isSubscript() |
boolean |
isSuperscript() |
boolean |
isUnderlined() |
void |
setBold(boolean bold)
Sets the bold state
|
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
setFontInfo(FontInfo, FontGroup) with just a font name |
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
setFontInfo(FontInfo, FontGroup) with just a font name |
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
|
void |
setItalic(boolean italic)
Sets the italic state
|
void |
setStrikethrough(boolean stroked)
Sets the strikethrough state
|
void |
setText(java.lang.String text) |
void |
setUnderlined(boolean underlined)
Sets the underlined state
|
java.lang.String getRawText()
void setText(java.lang.String text)
TextRun.TextCap getTextCap()
PaintStyle getFontColor()
PaintStyle.SolidPaint
, but but also other classes are possibleDrawPaint.getPaint(java.awt.Graphics2D, PaintStyle)
,
PaintStyle.SolidPaint.getSolidColor()
,
DrawPaint.applyColorTransform(ColorStyle)
void setFontColor(java.awt.Color color)
color
- the colorvoid setFontColor(PaintStyle color)
color
- the colorDrawPaint.createSolidPaint(Color)
java.lang.Double getFontSize()
void setFontSize(java.lang.Double fontSize)
fontSize
- font size in points, if null the underlying fontsize will be unsetjava.lang.String getFontFamily()
getFontInfo(FontGroup)
java.lang.String getFontFamily(FontGroup fontGroup)
getFontInfo(FontGroup)
fontGroup
- the font group, i.e. the range of glpyhs to be covered.
if null
, the font group matching the first character will be returnedvoid setFontFamily(java.lang.String typeface)
setFontInfo(FontInfo, FontGroup)
with just a font nametypeface
- 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.void setFontFamily(java.lang.String typeface, FontGroup fontGroup)
setFontInfo(FontInfo, FontGroup)
with just a font nametypeface
- 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.fontGroup
- the font group, i.e. the range of glpyhs to be covered.
if null
, the font group matching the first character will be returnedFontInfo getFontInfo(FontGroup fontGroup)
fontGroup
- the font group, i.e. the range of glpyhs to be covered.
if null
, the font group matching the first character will be returnednull
if not setvoid setFontInfo(FontInfo fontInfo, FontGroup fontGroup)
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.fontGroup
- the font group, i.e. the range of glpyhs to be covered. defaults to latin, if null
.boolean isBold()
void setBold(boolean bold)
bold
- set to true for bold text, false for normal weightboolean isItalic()
void setItalic(boolean italic)
italic
- set to true for italic text, false for non-italicsboolean isUnderlined()
void setUnderlined(boolean underlined)
underlined
- set to true for underlined text, false for no underliningboolean isStrikethrough()
void setStrikethrough(boolean stroked)
stroked
- set to true for stroked text, false for no strokingboolean isSubscript()
boolean isSuperscript()
byte getPitchAndFamily()
Hyperlink<?,?> getHyperlink()
Hyperlink<?,?> createHyperlink()
@Internal TextRun.FieldType getFieldType()
null
if text run is not a fieldTextParagraph<?,?,?> getParagraph()
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.