Modifier and Type | Method and Description |
---|---|
XSLFHyperlink |
createHyperlink() |
double |
getCharacterSpacing() |
Color |
getFontColor() |
String |
getFontFamily() |
double |
getFontSize() |
XSLFHyperlink |
getHyperlink() |
byte |
getPitchAndFamily() |
protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties |
getRPr() |
String |
getText() |
TextCap |
getTextCap() |
org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun |
getXmlObject() |
boolean |
isBold() |
boolean |
isItalic() |
boolean |
isStrikethrough() |
boolean |
isSubscript() |
boolean |
isSuperscript() |
boolean |
isUnderline() |
void |
setBaselineOffset(double baselineOffset)
Set the baseline for both the superscript and subscript fonts.
|
void |
setBold(boolean bold)
Specifies whether this run of text will be formatted as bold text
|
void |
setCharacterSpacing(double spc)
Set the spacing between characters within a text run.
|
void |
setFontColor(Color color) |
void |
setFontFamily(String typeface)
Specifies the typeface, or name of the font that is to be used for this text run.
|
void |
setFontFamily(String typeface,
byte charset,
byte pictAndFamily,
boolean isSymbol) |
void |
setFontSize(double fontSize) |
void |
setItalic(boolean italic) |
void |
setStrikethrough(boolean strike)
Specifies whether a run of text will be formatted as strikethrough text.
|
void |
setSubscript(boolean flag)
Set whether the text in this run is formatted as subscript.
|
void |
setSuperscript(boolean flag)
Set whether the text in this run is formatted as superscript.
|
void |
setText(String text) |
void |
setUnderline(boolean underline) |
String |
toString() |
public String getText()
public void setText(String text)
public org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun getXmlObject()
public void setFontColor(Color color)
public Color getFontColor()
public void setFontSize(double fontSize)
fontSize
- font size in points.
The value of -1
unsets the Sz attribyte from the underlying xml beanpublic double getFontSize()
public double getCharacterSpacing()
public void setCharacterSpacing(double spc)
The spacing is specified in points. Positive values will cause the text to expand, negative values to condense.
spc
- character spacing in points.public void setFontFamily(String typeface)
typeface
- the font to apply to this text run.
The value of null
unsets the Typeface attrubute from the underlying xml.public void setFontFamily(String typeface, byte charset, byte pictAndFamily, boolean isSymbol)
public String getFontFamily()
public byte getPitchAndFamily()
public void setStrikethrough(boolean strike)
strike
- whether a run of text will be formatted as strikethrough text.public boolean isStrikethrough()
public boolean isSuperscript()
public void setBaselineOffset(double baselineOffset)
The size is specified using a percentage. Positive values indicate superscript, negative values indicate subscript.
baselineOffset
- public void setSuperscript(boolean flag)
setBaselineOffset(double)
public void setSubscript(boolean flag)
setBaselineOffset(double)
public boolean isSubscript()
public TextCap getTextCap()
public void setBold(boolean bold)
bold
- whether this run of text will be formatted as bold textpublic boolean isBold()
public void setItalic(boolean italic)
italic
- whether this run of text is formatted as italic textpublic boolean isItalic()
public void setUnderline(boolean underline)
underline
- whether this run of text is formatted as underlined textpublic boolean isUnderline()
protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties getRPr()
public XSLFHyperlink createHyperlink()
public XSLFHyperlink getHyperlink()
Copyright © 2020. All rights reserved.