|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--superwaba.ext.xplat.io.print.PrintManager
This class represents a print manager, which is extended by the drivers to provide a common way to handle the printer. Please be careful when using these methods; any error may freeze the device.
This is not free software. This library can be purchased at the SuperWaba site.
| Field Summary | |
protected superwaba.ext.xplat.io.print.Graphics |
g
The Graphics instance that may be assigned to this print manager |
protected superwaba.ext.xplat.io.print.Settings |
set
The Settings instance that may be assigned to this print manager |
protected TypeWriter |
tw
The TypeWriter instance that may be assigned to this print manager |
| Constructor Summary | |
protected |
PrintManager()
This class cannot be instantiated by its constructor |
| Method Summary | |
abstract void |
close()
Closes this print manager. |
abstract void |
finishPage()
Ends a page, flushing the contents. |
abstract void |
formFeed()
Do a form feed. |
abstract String |
getDetailedErrorMessage(superwaba.ext.xplat.io.print.PrinterException e)
Given the PrinterException, returns a detailed error message for the problem. |
abstract superwaba.ext.xplat.io.print.FontMetrics |
getFontMetrics(superwaba.ext.xplat.io.print.Font f)
Gets a FontMetrics object for the given font |
superwaba.ext.xplat.io.print.Graphics |
getGraphics()
May return the Graphics instance if this print manager was opened using textMode = true. |
superwaba.ext.xplat.io.print.Settings |
getSettings()
Will return the Settings instance assigned to this print manager |
TypeWriter |
getTypeWriter()
May return the TypeWritter instance if this print manager was opened using textMode = false. |
abstract void |
open(String printerName,
String portName,
int baudRate,
boolean textMode)
This method must be extended and must set the fields Graphics, TypeWriter and Settings accordingly. |
abstract void |
startPage()
Start a new page. |
abstract int |
writeBytes(byte[] buf,
int start,
int len)
Send bytes to the printer, usualy scape codes and contents |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
toString,
wait,
wait |
| Field Detail |
protected superwaba.ext.xplat.io.print.Graphics g
protected TypeWriter tw
protected superwaba.ext.xplat.io.print.Settings set
| Constructor Detail |
protected PrintManager()
| Method Detail |
public abstract void open(String printerName,
String portName,
int baudRate,
boolean textMode)
throws superwaba.ext.xplat.io.print.PrinterException
public superwaba.ext.xplat.io.print.Graphics getGraphics()
throws superwaba.ext.xplat.io.print.NotSupportedException
public TypeWriter getTypeWriter()
throws superwaba.ext.xplat.io.print.NotSupportedException
public superwaba.ext.xplat.io.print.Settings getSettings()
public abstract superwaba.ext.xplat.io.print.FontMetrics getFontMetrics(superwaba.ext.xplat.io.print.Font f)
public abstract void close()
throws superwaba.ext.xplat.io.print.PrinterException
public abstract void formFeed()
throws superwaba.ext.xplat.io.print.PrinterException,
superwaba.ext.xplat.io.print.NotSupportedException
public abstract void startPage()
throws superwaba.ext.xplat.io.print.PrinterException
public abstract void finishPage()
throws superwaba.ext.xplat.io.print.PrinterException
public abstract int writeBytes(byte[] buf,
int start,
int len)
throws superwaba.ext.xplat.io.print.PrinterException,
ArrayIndexOutOfBoundsException,
superwaba.ext.xplat.io.print.NotSupportedException
public abstract String getDetailedErrorMessage(superwaba.ext.xplat.io.print.PrinterException e)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||