|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.poi.xslf.usermodel.XSLFTextRun
@Beta public class XSLFTextRun
Represents a run of text within the containing text body. The run element is the lowest level text separation mechanism within a text body.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.poi.sl.usermodel.TextRun |
|---|
TextRun.TextCap |
| Constructor Summary | |
|---|---|
protected |
XSLFTextRun(org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun r,
XSLFTextParagraph p)
|
| Method Summary | |
|---|---|
XSLFHyperlink |
createHyperlink()
|
double |
getCharacterSpacing()
|
PaintStyle |
getFontColor()
|
java.lang.String |
getFontFamily()
|
java.lang.Double |
getFontSize()
|
XSLFHyperlink |
getHyperlink()
|
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.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)
|
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,
byte charset,
byte pictAndFamily,
boolean isSymbol)
|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected XSLFTextRun(org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun r,
XSLFTextParagraph p)
| Method Detail |
|---|
public java.lang.String getRawText()
getRawText in interface TextRunpublic void setText(java.lang.String text)
setText in interface TextRunpublic org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun getXmlObject()
public 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 TextRun
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)
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.
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)
setBold in interface TextRunpublic boolean isBold()
isBold in interface TextRunpublic void setItalic(boolean italic)
setItalic in interface TextRunpublic boolean isItalic()
isItalic 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 exist
public java.lang.String toString()
toString in class java.lang.Objectpublic XSLFHyperlink createHyperlink()
createHyperlink in interface TextRunpublic XSLFHyperlink getHyperlink()
getHyperlink in interface TextRun
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||