xmlgraphics-commons 1.0

org.apache.xmlgraphics.java2d.ps
Class StrokingTextHandler

java.lang.Object
  extended byorg.apache.xmlgraphics.java2d.ps.StrokingTextHandler
All Implemented Interfaces:
TextHandler

public class StrokingTextHandler
extends java.lang.Object
implements TextHandler

Default TextHandler implementation which paints text using graphics primitives (shapes).


Constructor Summary
StrokingTextHandler(PSGraphics2D g2d)
           
 
Method Summary
 void drawString(java.lang.String text, float x, float y)
          Draw some text.
 void writePageSetup()
          Is called by when a "PageSetup" section of the PostScript document is generated.
 void writeSetup()
          Is called by when the "Setup" or "Prolog" of the PostScript document is generated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrokingTextHandler

public StrokingTextHandler(PSGraphics2D g2d)
Method Detail

writeSetup

public void writeSetup()
                throws java.io.IOException
Description copied from interface: TextHandler
Is called by when the "Setup" or "Prolog" of the PostScript document is generated. Subclasses can do font registration, for example.

Specified by:
writeSetup in interface TextHandler
Throws:
java.io.IOException - In case of an I/O error
See Also:
TextHandler.writeSetup()

writePageSetup

public void writePageSetup()
                    throws java.io.IOException
Description copied from interface: TextHandler
Is called by when a "PageSetup" section of the PostScript document is generated. Subclasses can do some font initialization if necessary.

Specified by:
writePageSetup in interface TextHandler
Throws:
java.io.IOException - In case of an I/O error
See Also:
TextHandler.writePageSetup()

drawString

public void drawString(java.lang.String text,
                       float x,
                       float y)
Description copied from interface: TextHandler
Draw some text.

Specified by:
drawString in interface TextHandler
Parameters:
text - the text to paint
x - the x-coordinate where the String should be rendered
y - the y-coordinate where the String should be rendered
See Also:
TextHandler.drawString(java.lang.String, float, float)

xmlgraphics-commons 1.0

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