Class XDDFTextRun
java.lang.Object
org.apache.poi.xddf.usermodel.text.XDDFTextRun
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedXDDFTextRun(org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun run, XDDFTextParagraph parent) protectedXDDFTextRun(org.openxmlformats.schemas.drawingml.x2006.main.CTTextField run, XDDFTextParagraph parent) protectedXDDFTextRun(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.CTTextCharacterPropertiesgetText()booleanisBold()booleanbooleanisField()booleanisItalic()booleanbooleanbooleanbooleanbooleanbooleanbooleanlinkToAction(String action) linkToExternal(String url, PackagePart localPart, POIXMLRelation relation) linkToInternal(String action, PackagePart localPart, POIXMLRelation relation, PackagePartName target) voidsetAlternativeLanguage(Locale lang) voidsetBaseline(Double offset) Set the baseline for both the superscript and subscript fonts.voidSpecifies whether this run of text will be formatted as bold text.voidsetBookmark(String bookmark) voidsetCapitals(CapsType caps) voidsetCharacterKerning(Double kerning) Set the kerning of characters within a text run.voidsetCharacterSpacing(Double spacing) Set the spacing between characters within a text run.voidvoidsetFillProperties(XDDFFillProperties properties) voidsetFontColor(XDDFColor color) voidNote: In order to get fonts to unset the property for a given font family useXDDFFont.unsetFontForGroup(FontGroup)voidsetFontSize(Double size) voidsetHighlight(XDDFColor color) voidvoidsetKumimoji(Boolean kumimoji) voidsetLanguage(Locale lang) voidsetLineProperties(XDDFLineProperties properties) voidsetNoProof(Boolean noproof) voidsetNormalizeHeights(Boolean normalize) voidsetSpellError(Boolean error) voidsetStrikeThrough(StrikeType strike) voidsetSubscript(Double offset) Set whether the text in this run is formatted as subscript.voidsetSuperscript(Double offset) Set whether the text in this run is formatted as superscript.voidvoidsetUnderline(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 valuenullunsets the size for this run.- Minimum inclusive =
- 1
- Maximum inclusive =
- 400
-
getFontSize
-
setCharacterKerning
Set the kerning of characters within a text run.The value
nullunsets 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
nullunsets 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()
-