Class XDDFTextRun
- java.lang.Object
-
- org.apache.poi.xddf.usermodel.text.XDDFTextRun
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedXDDFTextRun(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
-
-
-
Constructor Detail
-
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 Detail
-
getParentParagraph
public XDDFTextParagraph getParentParagraph()
-
isLineBreak
public boolean isLineBreak()
-
isField
public boolean isField()
-
isRegularRun
public boolean isRegularRun()
-
getText
public String getText()
-
setText
public void setText(String text)
-
setDirty
public void setDirty(Boolean dirty)
-
getDirty
public Boolean getDirty()
-
setSpellError
public void setSpellError(Boolean error)
-
getSpellError
public Boolean getSpellError()
-
setNoProof
public void setNoProof(Boolean noproof)
-
getNoProof
public Boolean getNoProof()
-
setNormalizeHeights
public void setNormalizeHeights(Boolean normalize)
-
getNormalizeHeights
public Boolean getNormalizeHeights()
-
setKumimoji
public void setKumimoji(Boolean kumimoji)
-
isKumimoji
public boolean isKumimoji()
-
setBold
public void setBold(Boolean bold)
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
public void setItalic(Boolean italic)
- 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
public void setStrikeThrough(StrikeType strike)
- 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
public StrikeType getStrikeThrough()
- Returns:
- which strike style this run of text is formatted with.
-
setUnderline
public void setUnderline(UnderlineType underline)
- 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
public UnderlineType getUnderline()
- Returns:
- which underline style this run of text is formatted with.
-
setCapitals
public void setCapitals(CapsType caps)
- 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
public CapsType 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
public void setBaseline(Double offset)
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.
-
setSuperscript
public void setSuperscript(Double offset)
Set whether the text in this run is formatted as superscript.The size is specified using a percentage.
-
setSubscript
public void setSubscript(Double offset)
Set whether the text in this run is formatted as subscript.The size is specified using a percentage.
-
setFillProperties
public void setFillProperties(XDDFFillProperties properties)
-
setFontColor
public void setFontColor(XDDFColor color)
-
getFontColor
public XDDFColor getFontColor()
-
setFonts
public void setFonts(XDDFFont[] fonts)
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
public XDDFFont[] getFonts()
-
setFontSize
public void setFontSize(Double size)
- Parameters:
size- font size in points. The valuenullunsets the size for this run.- Minimum inclusive =
- 1
- Maximum inclusive =
- 400
-
getFontSize
public Double getFontSize()
-
setCharacterKerning
public void setCharacterKerning(Double kerning)
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
public Double getCharacterKerning()
- Returns:
- the kerning of characters within a text run,
If this attribute is omitted then returns
null.
-
setCharacterSpacing
public void setCharacterSpacing(Double spacing)
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
public Double getCharacterSpacing()
- Returns:
- the spacing between characters within a text run,
If this attribute is omitted then returns
null.
-
setBookmark
public void setBookmark(String bookmark)
-
getBookmark
public String getBookmark()
-
linkToExternal
public XDDFHyperlink linkToExternal(String url, PackagePart localPart, POIXMLRelation relation)
-
linkToAction
public XDDFHyperlink linkToAction(String action)
-
linkToInternal
public XDDFHyperlink linkToInternal(String action, PackagePart localPart, POIXMLRelation relation, PackagePartName target)
-
getHyperlink
public XDDFHyperlink getHyperlink()
-
createMouseOver
public XDDFHyperlink createMouseOver(String action)
-
getMouseOver
public XDDFHyperlink getMouseOver()
-
setLanguage
public void setLanguage(Locale lang)
-
getLanguage
public Locale getLanguage()
-
setAlternativeLanguage
public void setAlternativeLanguage(Locale lang)
-
getAlternativeLanguage
public Locale getAlternativeLanguage()
-
setHighlight
public void setHighlight(XDDFColor color)
-
getHighlight
public XDDFColor getHighlight()
-
setLineProperties
public void setLineProperties(XDDFLineProperties properties)
-
getLineProperties
public XDDFLineProperties getLineProperties()
-
getProperties
@Internal protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties getProperties()
-
-