Class XDDFTextRun
java.lang.Object
org.apache.poi.xddf.usermodel.text.XDDFTextRun
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
XDDFTextRun
(org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun run, XDDFTextParagraph parent) protected
XDDFTextRun
(org.openxmlformats.schemas.drawingml.x2006.main.CTTextField run, XDDFTextParagraph parent) protected
XDDFTextRun
(org.openxmlformats.schemas.drawingml.x2006.main.CTTextLineBreak run, XDDFTextParagraph parent) -
Method Summary
Modifier and TypeMethodDescriptioncreateMouseOver
(String action) getDirty()
XDDFFont[]
getFonts()
protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties
getText()
boolean
isBold()
boolean
boolean
isField()
boolean
isItalic()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
linkToAction
(String action) linkToExternal
(String url, PackagePart localPart, POIXMLRelation relation) linkToInternal
(String action, PackagePart localPart, POIXMLRelation relation, PackagePartName target) void
setAlternativeLanguage
(Locale lang) void
setBaseline
(Double offset) Set the baseline for both the superscript and subscript fonts.void
Specifies whether this run of text will be formatted as bold text.void
setBookmark
(String bookmark) void
setCapitals
(CapsType caps) void
setCharacterKerning
(Double kerning) Set the kerning of characters within a text run.void
setCharacterSpacing
(Double spacing) Set the spacing between characters within a text run.void
void
setFillProperties
(XDDFFillProperties properties) void
setFontColor
(XDDFColor color) void
Note: In order to get fonts to unset the property for a given font family useXDDFFont.unsetFontForGroup(FontGroup)
void
setFontSize
(Double size) void
setHighlight
(XDDFColor color) void
void
setKumimoji
(Boolean kumimoji) void
setLanguage
(Locale lang) void
setLineProperties
(XDDFLineProperties properties) void
setNoProof
(Boolean noproof) void
setNormalizeHeights
(Boolean normalize) void
setSpellError
(Boolean error) void
setStrikeThrough
(StrikeType strike) void
setSubscript
(Double offset) Set whether the text in this run is formatted as subscript.void
setSuperscript
(Double offset) Set whether the text in this run is formatted as superscript.void
void
setUnderline
(UnderlineType underline)
-
Constructor Details
-
XDDFTextRun
@Internal protected XDDFTextRun(org.openxmlformats.schemas.drawingml.x2006.main.CTTextLineBreak run, XDDFTextParagraph parent) -
XDDFTextRun
@Internal protected XDDFTextRun(org.openxmlformats.schemas.drawingml.x2006.main.CTTextField run, XDDFTextParagraph parent) -
XDDFTextRun
@Internal protected XDDFTextRun(org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun run, XDDFTextParagraph parent)
-
-
Method Details
-
getParentParagraph
-
isLineBreak
public boolean isLineBreak() -
isField
public boolean isField() -
isRegularRun
public boolean isRegularRun() -
getText
-
setText
-
setDirty
-
getDirty
-
setSpellError
-
getSpellError
-
setNoProof
-
getNoProof
-
setNormalizeHeights
-
getNormalizeHeights
-
setKumimoji
-
isKumimoji
public boolean isKumimoji() -
setBold
Specifies whether this run of text will be formatted as bold text.- Parameters:
bold
- whether this run of text will be formatted as bold text.
-
isBold
public boolean isBold()- Returns:
- whether this run of text is formatted as bold text.
-
setItalic
- Parameters:
italic
- whether this run of text is formatted as italic text.
-
isItalic
public boolean isItalic()- Returns:
- whether this run of text is formatted as italic text.
-
setStrikeThrough
- Parameters:
strike
- which strike style this run of text is formatted with.
-
isStrikeThrough
public boolean isStrikeThrough()- Returns:
- whether this run of text is formatted as striked text.
-
getStrikeThrough
- Returns:
- which strike style this run of text is formatted with.
-
setUnderline
- Parameters:
underline
- which underline style this run of text is formatted with.
-
isUnderline
public boolean isUnderline()- Returns:
- whether this run of text is formatted as underlined text.
-
getUnderline
- Returns:
- which underline style this run of text is formatted with.
-
setCapitals
- Parameters:
caps
- which caps style this run of text is formatted with.
-
isCapitals
public boolean isCapitals()- Returns:
- whether this run of text is formatted as capitalized text.
-
getCapitals
- Returns:
- which caps style this run of text is formatted with.
-
isSubscript
public boolean isSubscript()- Returns:
- whether a run of text will be formatted as a subscript text. Default is false.
-
isSuperscript
public boolean isSuperscript()- Returns:
- whether a run of text will be formatted as a superscript text. Default is false.
-
setBaseline
Set the baseline for both the superscript and subscript fonts.The size is specified using a percentage. Positive values indicate superscript, negative values indicate subscript.
- Parameters:
offset
-
-
setSuperscript
Set whether the text in this run is formatted as superscript.The size is specified using a percentage.
- Parameters:
offset
-
-
setSubscript
Set whether the text in this run is formatted as subscript.The size is specified using a percentage.
- Parameters:
offset
-
-
setFillProperties
-
setFontColor
-
getFontColor
-
setFonts
Note: In order to get fonts to unset the property for a given font family useXDDFFont.unsetFontForGroup(FontGroup)
- Parameters:
fonts
- to set or unset on the run.
-
getFonts
-
setFontSize
- Parameters:
size
- font size in points. The valuenull
unsets the size for this run.- Minimum inclusive =
- 1
- Maximum inclusive =
- 400
-
getFontSize
-
setCharacterKerning
Set the kerning of characters within a text run.The value
null
unsets the kerning for this run.- Parameters:
kerning
- character kerning in points.- Minimum inclusive =
- 0
- Maximum inclusive =
- 4000
-
getCharacterKerning
- Returns:
- the kerning of characters within a text run,
If this attribute is omitted then returns
null
.
-
setCharacterSpacing
Set the spacing between characters within a text run.The spacing is specified in points. Positive values will cause the text to expand, negative values to condense.
The value
null
unsets the spacing for this run.- Parameters:
spacing
- character spacing in points.- Minimum inclusive =
- -4000
- Maximum inclusive =
- 4000
-
getCharacterSpacing
- Returns:
- the spacing between characters within a text run,
If this attribute is omitted then returns
null
.
-
setBookmark
-
getBookmark
-
linkToExternal
-
linkToAction
-
linkToInternal
public XDDFHyperlink linkToInternal(String action, PackagePart localPart, POIXMLRelation relation, PackagePartName target) -
getHyperlink
-
createMouseOver
-
getMouseOver
-
setLanguage
-
getLanguage
-
setAlternativeLanguage
-
getAlternativeLanguage
-
setHighlight
-
getHighlight
-
setLineProperties
-
getLineProperties
-
getProperties
@Internal protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties getProperties()
-