superwaba.ext.xplat.io.print
Class FontMetrics

java.lang.Object
  |
  +--superwaba.ext.xplat.io.print.FontMetrics

public abstract class FontMetrics
extends Object

This class is used to get the text height and width for a given font.


Constructor Summary
FontMetrics(Font font)
           
 
Method Summary
abstract  int getHeight()
          Returns the height of the current font
abstract  int getTextWidth(String s)
          Returns the text width in the current font
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, toString, wait, wait
 

Constructor Detail

FontMetrics

public FontMetrics(Font font)
Method Detail

getHeight

public abstract int getHeight()
                       throws PrinterException,
                              NotSupportedException
Returns the height of the current font

getTextWidth

public abstract int getTextWidth(String s)
                          throws PrinterException,
                                 NotSupportedException
Returns the text width in the current font