TextRun.FieldType, TextRun.TextCap| Modifier | Constructor and Description |
|---|---|
protected |
XSLFTextRun(org.apache.xmlbeans.XmlObject r,
XSLFTextParagraph p) |
| Modifier and Type | Method and Description |
|---|---|
XSLFHyperlink |
createHyperlink() |
double |
getCharacterSpacing() |
TextRun.FieldType |
getFieldType() |
PaintStyle |
getFontColor() |
java.lang.String |
getFontFamily() |
java.lang.String |
getFontFamily(FontGroup fontGroup) |
FontInfo |
getFontInfo(FontGroup fontGroup) |
java.lang.Double |
getFontSize() |
XSLFHyperlink |
getHyperlink() |
XSLFTextParagraph |
getParagraph() |
byte |
getPitchAndFamily() |
java.lang.String |
getRawText() |
protected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties |
getRPr(boolean create)
Return the character properties
|
TextRun.TextCap |
getTextCap() |
org.apache.xmlbeans.XmlObject |
getXmlObject()
Return the text run xmlbeans object.
|
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) |
void |
setCharacterSpacing(double spc)
Set the spacing between characters within a text run.
|
void |
setFontColor(java.awt.Color color) |
void |
setFontColor(PaintStyle color) |
void |
setFontFamily(java.lang.String typeface) |
void |
setFontFamily(java.lang.String typeface,
FontGroup fontGroup) |
void |
setFontInfo(FontInfo fontInfo,
FontGroup fontGroup) |
void |
setFontSize(java.lang.Double fontSize) |
void |
setItalic(boolean italic) |
void |
setStrikethrough(boolean strike) |
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) |
java.lang.String |
toString() |
protected XSLFTextRun(org.apache.xmlbeans.XmlObject r,
XSLFTextParagraph p)
public java.lang.String getRawText()
getRawText in interface TextRunpublic org.apache.xmlbeans.XmlObject getXmlObject()
CTTextField,
CTTextLineBreak or usually a CTRegularTextRunpublic void setFontColor(java.awt.Color color)
setFontColor in interface TextRunpublic void setFontColor(PaintStyle color)
setFontColor in interface TextRunpublic PaintStyle getFontColor()
getFontColor in interface TextRunpublic void setFontSize(java.lang.Double fontSize)
setFontSize in interface TextRunpublic java.lang.Double getFontSize()
getFontSize 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)
setFontFamily in interface TextRunpublic void setFontFamily(java.lang.String typeface,
FontGroup fontGroup)
setFontFamily in interface TextRunpublic void setFontInfo(FontInfo fontInfo, FontGroup fontGroup)
setFontInfo in interface TextRunpublic java.lang.String getFontFamily()
getFontFamily in interface TextRunpublic java.lang.String getFontFamily(FontGroup fontGroup)
getFontFamily in interface TextRunpublic FontInfo getFontInfo(FontGroup fontGroup)
getFontInfo in interface TextRunpublic byte getPitchAndFamily()
getPitchAndFamily in interface TextRunpublic void setStrikethrough(boolean strike)
setStrikethrough in interface TextRunpublic 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.
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 setUnderlined(boolean underline)
setUnderlined in interface TextRunpublic boolean isUnderlined()
isUnderlined in interface TextRunprotected org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties getRPr(boolean create)
create - if true, create an empty character properties object if it doesn't existpublic java.lang.String toString()
toString in class java.lang.Objectpublic XSLFHyperlink createHyperlink()
createHyperlink in interface TextRunpublic XSLFHyperlink getHyperlink()
getHyperlink in interface TextRunpublic TextRun.FieldType getFieldType()
getFieldType in interface TextRunpublic XSLFTextParagraph getParagraph()
getParagraph in interface TextRun