superwaba.ext.palm.io.print.irprint
Class IrPrintPrintManager

java.lang.Object
  |
  +--superwaba.ext.xplat.io.print.PrintManager
        |
        +--superwaba.ext.palm.io.print.irprint.IrPrintPrintManager

public class IrPrintPrintManager
extends PrintManager

The PrintManager implementation for IrPrint.


Fields inherited from class superwaba.ext.xplat.io.print.PrintManager
g, set, tw
 
Constructor Summary
IrPrintPrintManager()
          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

IrPrintPrintManager

public IrPrintPrintManager()
This class may not be directly instantiated. To get its intance, use:
  try
  {
     Class c = Class.forName("superwaba.ext.palm.io.print.irprint.IrPrintPrintManager");
     pm = (PrintManager)c.newInstance();
     ...
  }
  catch (ClassNotFoundException e) {throw new RuntimeException("Please install PalmIoPrintIrPrint.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, which must be true in IrPrint (IrPrint does not have graphics capabilities).
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. Note that IrPrint does not support a font metrics.
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)
Description copied from class: PrintManager
Given the PrinterException, returns a detailed error message for the problem.
Overrides:
getDetailedErrorMessage in class PrintManager