superwaba.ext.xplat.io.print.pboy
Class PBoyPrintManager

java.lang.Object
  |
  +--superwaba.ext.xplat.io.print.PrintManager
        |
        +--superwaba.ext.xplat.io.print.pboy.PBoyPrintManager

public class PBoyPrintManager
extends PrintManager

Implementation of the print.PrintManager for the PrintBoy support under SuperWaba.


Fields inherited from class superwaba.ext.xplat.io.print.PrintManager
g, set, tw
 
Constructor Summary
PBoyPrintManager()
          This class may not be directly instantiated.
 
Method Summary
 void close()
          Closes this print manager.
 void finishPage()
          Ends a page, flushing the contents.
 void formFeed()
          Do a form feed.
 java.lang.String getDetailedErrorMessage(PrinterException e)
          Given the PrinterException, returns a detailed error message for the problem.
 FontMetrics getFontMetrics(Font f)
          Gets a FontMetrics object for the given font
 void open(java.lang.String printerName, java.lang.String portName, int baudRate, boolean textMode)
          Open this print manager.
 void startPage()
          Start a new page.
 int writeBytes(byte[] buf, int start, int len)
          Send bytes to the printer, usualy scape codes and contents
 
Methods inherited from class superwaba.ext.xplat.io.print.PrintManager
getGraphics, getSettings, getTypeWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBoyPrintManager

public PBoyPrintManager()
This class may not be directly instantiated. To get its intance, use:
  try
  {
     Class c = Class.forName("superwaba.ext.xplat.io.print.pboy.PBoyPrintManager");
     pm = (PrintManager)c.newInstance();
     ...
  }
  catch (ClassNotFoundException e) {throw new RuntimeException("Please install PalmIoPrintPBoy.pdb");}
  catch (Exception ee) {ee.printStackTrace();}
 
Method Detail

open

public void open(java.lang.String printerName,
                 java.lang.String portName,
                 int baudRate,
                 boolean textMode)
          throws PrinterException
Open this print manager. All parameters are ignored, except textMode.
Overrides:
open in class PrintManager

close

public void close()
           throws PrinterException
Closes this print manager.
Overrides:
close in class PrintManager

formFeed

public void formFeed()
              throws PrinterException,
                     NotSupportedException
Do a form feed. You must always call formFeed before calling finishPage.
Overrides:
formFeed in class PrintManager

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Gets a FontMetrics object for the given font
Overrides:
getFontMetrics in class PrintManager

writeBytes

public int writeBytes(byte[] buf,
                      int start,
                      int len)
               throws PrinterException,
                      java.lang.ArrayIndexOutOfBoundsException,
                      NotSupportedException
Send bytes to the printer, usualy scape codes and contents
Overrides:
writeBytes in class PrintManager

startPage

public void startPage()
               throws PrinterException
Start a new page. You must always start a new page before writing to the printer.
Overrides:
startPage in class PrintManager

finishPage

public void finishPage()
                throws PrinterException
Ends a page, flushing the contents. You must always call formFeed before calling finishPage.
Overrides:
finishPage in class PrintManager

getDetailedErrorMessage

public java.lang.String getDetailedErrorMessage(PrinterException e)
Given the PrinterException, returns a detailed error message for the problem.
Overrides:
getDetailedErrorMessage in class PrintManager