|
|||||||||
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.
Field Summary | |
protected Graphics |
g
The Graphics instance that may be assigned to this print manager |
protected 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(PrinterException e)
Given the PrinterException, returns a detailed error message for the problem. |
abstract FontMetrics |
getFontMetrics(Font f)
Gets a FontMetrics object for the given font |
Graphics |
getGraphics()
May return the Graphics instance if this print manager was opened using textMode = true. |
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 Graphics g
protected TypeWriter tw
protected Settings set
Constructor Detail |
protected PrintManager()
Method Detail |
public abstract void open(String printerName, String portName, int baudRate, boolean textMode) throws PrinterException
public Graphics getGraphics() throws NotSupportedException
public TypeWriter getTypeWriter() throws NotSupportedException
public Settings getSettings()
public abstract FontMetrics getFontMetrics(Font f)
public abstract void close() throws PrinterException
public abstract void formFeed() throws PrinterException, NotSupportedException
public abstract void startPage() throws PrinterException
public abstract void finishPage() throws PrinterException
public abstract int writeBytes(byte[] buf, int start, int len) throws PrinterException, ArrayIndexOutOfBoundsException, NotSupportedException
public abstract String getDetailedErrorMessage(PrinterException e)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |