org.apache.poi.sl.usermodel
Interface TextRun

All Known Implementing Classes:
HSLFTextRun, XSLFTextRun

public interface TextRun

Some text.


Nested Class Summary
static class TextRun.TextCap
           
 
Method Summary
 PaintStyle getFontColor()
          Returns the font color.
 java.lang.String getFontFamily()
           
 java.lang.Double getFontSize()
           
 byte getPitchAndFamily()
           
 java.lang.String getRawText()
           
 TextRun.TextCap getTextCap()
           
 boolean isBold()
           
 boolean isItalic()
           
 boolean isStrikethrough()
           
 boolean isSubscript()
           
 boolean isSuperscript()
           
 boolean isUnderlined()
           
 void setFontColor(java.awt.Color color)
          Sets the (solid) font color - convenience function
 void setFontColor(PaintStyle color)
          Sets the font color
 void setFontSize(java.lang.Double fontSize)
           
 void setText(java.lang.String text)
           
 

Method Detail

getRawText

java.lang.String getRawText()

setText

void setText(java.lang.String text)

getTextCap

TextRun.TextCap getTextCap()

getFontColor

PaintStyle getFontColor()
Returns the font color. This usually returns a PaintStyle.SolidPaint, but but also other classes are possible

Returns:
the font color/paint
See Also:
DrawPaint.getPaint(java.awt.Graphics2D, PaintStyle), PaintStyle.SolidPaint.getSolidColor(), DrawPaint.applyColorTransform(ColorStyle)

setFontColor

void setFontColor(java.awt.Color color)
Sets the (solid) font color - convenience function

Parameters:
color - the color

setFontColor

void setFontColor(PaintStyle color)
Sets the font color

Parameters:
color - the color
See Also:
DrawPaint.createSolidPaint(Color)

getFontSize

java.lang.Double getFontSize()
Returns:
font size in points or null if font size is not set.

setFontSize

void setFontSize(java.lang.Double fontSize)
Parameters:
fontSize - font size in points, if null the underlying fontsize will be unset

getFontFamily

java.lang.String getFontFamily()

isBold

boolean isBold()

isItalic

boolean isItalic()

isUnderlined

boolean isUnderlined()

isStrikethrough

boolean isStrikethrough()

isSubscript

boolean isSubscript()

isSuperscript

boolean isSuperscript()

getPitchAndFamily

byte getPitchAndFamily()
Returns:
the pitch and family id or -1 if not applicable


Copyright 2015 The Apache Software Foundation or its licensors, as applicable.