ewe.fx.print
Class PrinterJobObject

java.lang.Object
  extended byewe.fx.print.PrinterJobObject
Direct Known Subclasses:
PrinterJob, PrintPreview

public abstract class PrinterJobObject
extends Object


Field Summary
protected  Object nativeJob
           
protected  boolean printerSelected
           
 
Constructor Summary
PrinterJobObject()
           
 
Method Summary
 boolean cancel()
          Cancel a print operation if one is underway.
 Handle getCurrentPrintingHandle()
          Get the Handle for the current printing operation.
protected abstract  Task getPrintTask(Printable toPrint, PageFormat format, PrintOptions po)
          Return a Task object that does the printing.
 boolean isPrinting()
          Return if the PrintJob is currently printing.
 Handle print(Printable toPrint, PageFormat format, PrintOptions po)
          This starts the printing process going.
protected  void printingComplete()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Field Detail

nativeJob

protected Object nativeJob

printerSelected

protected boolean printerSelected
Constructor Detail

PrinterJobObject

public PrinterJobObject()
Method Detail

isPrinting

public boolean isPrinting()
Return if the PrintJob is currently printing.


printingComplete

protected void printingComplete()

getCurrentPrintingHandle

public Handle getCurrentPrintingHandle()
Get the Handle for the current printing operation. If this returns null then there is no current printing.


cancel

public boolean cancel()
Cancel a print operation if one is underway. This calls stop(0) on the current print handle if one is present.


print

public Handle print(Printable toPrint,
                    PageFormat format,
                    PrintOptions po)
This starts the printing process going. The print() method of the toPrint object will be called with a page index starting from 0 and increasing until the validatePage method returns false. The format parameter will eventually be used to set a particular page format, but at the moment is not used.


getPrintTask

protected abstract Task getPrintTask(Printable toPrint,
                                     PageFormat format,
                                     PrintOptions po)
Return a Task object that does the printing. Once the task is complete it MUST call printingComplete() even if the task was cancelled.