Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.afp.svg
Class AFPTextHandler

    java.lang.Object
      org.apache.fop.afp.svg.AFPTextHandler

All Implemented Interfaces:
  FOPTextHandler, org.apache.xmlgraphics.java2d.TextHandler

public class AFPTextHandler
extends java.lang.Object
implements FOPTextHandler

Specialized TextHandler implementation that the AFPGraphics2D class delegates to to paint text using AFP GOCA text operations.

Field Summary
`protected Font` | `overrideFont` Overriding FontState

Constructor Summary
`AFPTextHandler(FontInfo fontInfo)` Main constructor.

Method Summary
`void` | `drawString(java.awt.Graphics2D g, java.lang.String str, float x, float y)` Add a text string to the current data object of the AFP datastream.
`void` | `drawString(java.lang.String text, float x, float y)`
`FontInfo` | `getFontInfo()` Return the font information associated with this object
`void` | `setOverrideFont(Font overrideFont)` Sets the overriding font.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### overrideFont

    protected Font overrideFont

  Overriding FontState

Constructor Detail

### AFPTextHandler

    public AFPTextHandler(FontInfo fontInfo)

  Main constructor.

Parameters:
  `fontInfo` - the AFPGraphics2D instance

Method Detail

### getFontInfo

    public FontInfo getFontInfo()

  Return the font information associated with this object

  Specified by:
    `getFontInfo` in interface `FOPTextHandler`
  Returns:
    the FontInfo object

### drawString

    public void drawString(java.lang.String text,
                           float x,
                           float y)
                    throws java.io.IOException

  Specified by:
    `drawString` in interface `org.apache.xmlgraphics.java2d.TextHandler`
  Throws:
    `java.io.IOException`

### drawString

    public void drawString(java.awt.Graphics2D g,
                           java.lang.String str,
                           float x,
                           float y)
                    throws java.io.IOException

  Add a text string to the current data object of the AFP datastream. The text is painted using text operations.

  Specified by:
    `drawString` in interface `org.apache.xmlgraphics.java2d.TextHandler`
  Throws:
    `java.io.IOException`

### setOverrideFont

    public void setOverrideFont(Font overrideFont)

  Sets the overriding font.

  Specified by:
    `setOverrideFont` in interface `FOPTextHandler`
  Parameters:
    `overrideFont` - Overriding Font to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.