Class AFPTextHandler

java.lang.Object
org.apache.xmlgraphics.java2d.StrokingTextHandler
org.apache.fop.svg.FOPTextHandlerAdapter
org.apache.fop.afp.svg.AFPTextHandler
All Implemented Interfaces:
FOPTextHandler, org.apache.xmlgraphics.java2d.TextHandler

public class AFPTextHandler extends FOPTextHandlerAdapter
Specialized TextHandler implementation that the AFPGraphics2D class delegates to to paint text using AFP GOCA text operations.
  • Field Details

    • overrideFont

      protected Font overrideFont
      Overriding FontState
  • Constructor Details

    • AFPTextHandler

      public AFPTextHandler(FontInfo fontInfo, AFPResourceManager resourceManager)
      Main constructor.
      Parameters:
      fontInfo - the AFPGraphics2D instance
      resourceManager - the AFPResourceManager instance
  • Method Details

    • getFontInfo

      public FontInfo getFontInfo()
      Return the font information associated with this object
      Returns:
      the FontInfo object
    • drawString

      public void drawString(Graphics2D g, String str, float x, float y)
      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
      Overrides:
      drawString in class org.apache.xmlgraphics.java2d.StrokingTextHandler
    • setOverrideFont

      public void setOverrideFont(Font overrideFont)
      Sets the overriding font.
      Parameters:
      overrideFont - Overriding Font to set