superwaba.ext.xplat.io.print
Class FontMetrics

java.lang.Object
  |
  +--superwaba.ext.xplat.io.print.FontMetrics
Direct Known Subclasses:
IrPrintFontMetrics, PBoyFontMetrics

public abstract class FontMetrics
extends java.lang.Object

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


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

Field Detail

font

protected Font font
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(java.lang.String s)
                          throws PrinterException,
                                 NotSupportedException
Returns the text width in the current font