TextRun.TextCap| Modifier and Type | Method and Description |
|---|---|
XSLFHyperlink |
createHyperlink()
Creates a new hyperlink and assigns it to this text run.
|
double |
getCharacterSpacing() |
PaintStyle |
getFontColor()
Returns the font color.
|
java.lang.String |
getFontFamily() |
java.lang.Double |
getFontSize()
Returns the font size which is either set directly on this text run or
given from the slide layout
|
XSLFHyperlink |
getHyperlink()
Return the associated hyperlink
|
byte |
getPitchAndFamily() |
java.lang.String |
getRawText() |
protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties |
getRPr() |
TextRun.TextCap |
getTextCap() |
org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun |
getXmlObject() |
boolean |
isBold() |
boolean |
isItalic() |
boolean |
isStrikethrough() |
boolean |
isSubscript() |
boolean |
isSuperscript() |
boolean |
isUnderlined() |
void |
setBaselineOffset(double baselineOffset)
Set the baseline for both the superscript and subscript fonts.
|
void |
setBold(boolean bold)
Sets the bold state
|
void |
setCharacterSpacing(double spc)
Set the spacing between characters within a text run.
|
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.
|
void |
setFontFamily(java.lang.String typeface,
byte charset,
byte pictAndFamily,
boolean isSymbol) |
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 strike)
Sets the strikethrough state
|
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(java.lang.String text) |
void |
setUnderlined(boolean underline)
Sets the underlined state
|
java.lang.String |
toString() |
public java.lang.String getRawText()
getRawText in interface TextRunpublic org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun getXmlObject()
public void setFontColor(java.awt.Color color)
TextRunsetFontColor in interface TextRuncolor - the colorpublic void setFontColor(PaintStyle color)
TextRunsetFontColor in interface TextRuncolor - the colorDrawPaint.createSolidPaint(Color)public PaintStyle getFontColor()
TextRunPaintStyle.SolidPaint, but but also other classes are possiblegetFontColor in interface TextRunDrawPaint.getPaint(java.awt.Graphics2D, PaintStyle),
PaintStyle.SolidPaint.getSolidColor(),
DrawPaint.applyColorTransform(ColorStyle)public void setFontSize(java.lang.Double fontSize)
TextRunsetFontSize in interface TextRunfontSize - font size in points, if null the underlying fontsize will be unsetpublic java.lang.Double getFontSize()
TextRungetFontSize in interface TextRunpublic 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(java.lang.String typeface)
TextRunsetFontFamily in interface TextRuntypeface - the font to apply to this text run.
The value of null unsets the Typeface attrubute from the underlying xml.public void setFontFamily(java.lang.String typeface,
byte charset,
byte pictAndFamily,
boolean isSymbol)
public java.lang.String getFontFamily()
getFontFamily in interface TextRunpublic byte getPitchAndFamily()
getPitchAndFamily in interface TextRunpublic void setStrikethrough(boolean strike)
TextRunsetStrikethrough in interface TextRunstrike - set to true for stroked text, false for no strokingpublic boolean isStrikethrough()
isStrikethrough in interface TextRunpublic boolean isSuperscript()
isSuperscript in interface TextRunpublic 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()
isSubscript in interface TextRunpublic TextRun.TextCap getTextCap()
getTextCap in interface TextRunpublic void setBold(boolean bold)
TextRunpublic boolean isBold()
public void setItalic(boolean italic)
TextRunpublic boolean isItalic()
public void setUnderlined(boolean underline)
TextRunsetUnderlined in interface TextRununderline - set to true for underlined text, false for no underliningpublic boolean isUnderlined()
isUnderlined in interface TextRunprotected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties getRPr()
public java.lang.String toString()
toString in class java.lang.Objectpublic XSLFHyperlink createHyperlink()
TextRuncreateHyperlink in interface TextRunpublic XSLFHyperlink getHyperlink()
TextRungetHyperlink in interface TextRunCopyright 2017 The Apache Software Foundation or its licensors, as applicable.