org.apache.poi.hslf.model
Class TextPainter

java.lang.Object
  extended by org.apache.poi.hslf.model.TextPainter

public final class TextPainter
extends java.lang.Object

Paint text into java.awt.Graphics2D

Author:
Yegor Kozlov

Nested Class Summary
static class TextPainter.TextElement
           
 
Field Summary
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
           
 
Constructor Summary
TextPainter(TextShape shape)
           
 
Method Summary
 java.text.AttributedString getAttributedString(TextRun txrun)
          Convert the underlying set of rich text runs into java.text.AttributedString
 TextPainter.TextElement[] getTextElements(float textWidth, java.awt.font.FontRenderContext frc)
           
 void paint(java.awt.Graphics2D graphics)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected POILogger logger

DEFAULT_BULLET_CHAR

protected static final char DEFAULT_BULLET_CHAR
Display unicode square if a bullet char can't be displayed, for example, if Wingdings font is used. TODO: map Wingdngs and Symbol to unicode Arial

See Also:
Constant Field Values

_shape

protected TextShape _shape
Constructor Detail

TextPainter

public TextPainter(TextShape shape)
Method Detail

getAttributedString

public java.text.AttributedString getAttributedString(TextRun txrun)
Convert the underlying set of rich text runs into java.text.AttributedString


paint

public void paint(java.awt.Graphics2D graphics)

getTextElements

public TextPainter.TextElement[] getTextElements(float textWidth,
                                                 java.awt.font.FontRenderContext frc)


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