public abstract class PrinterJobObject extends Object implements Printer
Modifier and Type | Field and Description |
---|---|
static FontManager |
globalFontManager
If this is not null then this will be assigned to all PointGraphics
created by a PrinterJobObject.
|
protected boolean |
outputCanChangeMediaOrientation
If the output actually changes the orientation of the media during the
newPage() method then this should be set true.
|
protected PrinterControl |
printerControl |
protected boolean |
printerSelected |
Constructor and Description |
---|
PrinterJobObject() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancel a print operation if one is underway.
|
protected abstract void |
cancelCurrentPage(Handle h) |
protected abstract boolean |
endPrinting(Handle h) |
Image |
getCompatibleImagePoints(double widthInPoints,
double heightInPoints) |
Handle |
getCurrentPrintingHandle()
Get the Handle for the current printing operation.
|
boolean |
getDPI(double[] dest)
The DPI of a PrinterJob is not definable, it is done on a page by page basis.
|
IPointDocument |
getPointDocument()
Return the IPointDocument IF the output is compatible (e.g. a PDF document).
|
protected 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.
|
protected boolean |
lockIfNotPrinting()
If this returns true, then no printing is currently being done
and the current thread holds the printLock.
|
protected abstract PointGraphics |
newPage(Handle h,
PageFormat format) |
Handle |
print(Printable toPrint,
PageFormat format,
PrintOptions po)
This starts the printing process going.
|
Handle |
print(PrintTask pt)
Start the process of printing and return a Handle to monitor or stop the operation.
|
protected abstract boolean |
printCurrentPage(Handle h) |
boolean |
printerWasSelected()
This returns if a Printer has been selected and so this PrinterJob is ready
for printing.
|
protected void |
printingComplete() |
void |
setPrinterProperties(PrinterProperties pp) |
protected abstract boolean |
startPrinting(Handle h,
String documentName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
printDialog
protected boolean printerSelected
protected PrinterControl printerControl
public static FontManager globalFontManager
protected boolean outputCanChangeMediaOrientation
public IPointDocument getPointDocument()
getPointDocument
in interface Printer
public boolean isPrinting()
protected boolean lockIfNotPrinting()
protected final void printingComplete()
public Handle getCurrentPrintingHandle()
public boolean cancel()
public final Handle print(Printable toPrint, PageFormat format, PrintOptions po)
public void setPrinterProperties(PrinterProperties pp)
setPrinterProperties
in interface Printer
protected abstract PointGraphics newPage(Handle h, PageFormat format)
protected abstract boolean printCurrentPage(Handle h)
protected abstract void cancelCurrentPage(Handle h)
protected abstract boolean endPrinting(Handle h)
protected Task getPrintTask(Printable toPrint, PageFormat format, PrintOptions po)
public boolean getDPI(double[] dest)
public Image getCompatibleImagePoints(double widthInPoints, double heightInPoints) throws IllegalArgumentException
IllegalArgumentException
public Handle print(PrintTask pt)
Printer
public boolean printerWasSelected()