public final class TextPainter extends java.lang.Object implements TextPainter
TextPainter.Key, TextPainter.TextElement
Modifier and Type | Field and Description |
---|---|
protected TextShape |
_shape |
protected static char |
DEFAULT_BULLET_CHAR
Display unicode square if a bullet char can't be displayed,
for example, if Wingdings font is used.
|
protected POILogger |
logger |
KEY_FONTFALLBACK, KEY_FONTMAP
Constructor and Description |
---|
TextPainter(TextShape shape) |
Modifier and Type | Method and Description |
---|---|
java.text.AttributedString |
getAttributedString(TextRun txrun) |
java.text.AttributedString |
getAttributedString(TextRun txrun,
java.awt.Graphics2D graphics)
Convert the underlying set of rich text runs into java.text.AttributedString
|
TextPainter.TextElement[] |
getTextElements(float textWidth,
java.awt.font.FontRenderContext frc) |
TextPainter.TextElement[] |
getTextElements(float textWidth,
java.awt.font.FontRenderContext frc,
java.awt.Graphics2D graphics) |
void |
paint(java.awt.Graphics2D graphics) |
protected POILogger logger
protected static final char DEFAULT_BULLET_CHAR
protected TextShape _shape
public TextPainter(TextShape shape)
public java.text.AttributedString getAttributedString(TextRun txrun)
public java.text.AttributedString getAttributedString(TextRun txrun, java.awt.Graphics2D graphics)
public void paint(java.awt.Graphics2D graphics)
public TextPainter.TextElement[] getTextElements(float textWidth, java.awt.font.FontRenderContext frc)
public TextPainter.TextElement[] getTextElements(float textWidth, java.awt.font.FontRenderContext frc, java.awt.Graphics2D graphics)
Copyright 2015 The Apache Software Foundation or its licensors, as applicable.