javax.print.event

Class PrintJobEvent

public class PrintJobEvent extends PrintEvent

PrintJobEvents are generated by a print job during print job processing to inform registered listeners about the state of processing.
Field Summary
static intDATA_TRANSFER_COMPLETE
Indicates that the data transfer to the print service has completed.
static intJOB_CANCELED
Indicates that the print job was canceled.
static intJOB_COMPLETE
Indicates that the print job was completed (=printed).
static intJOB_FAILED
Indicates that the print job failed to complete.
static intNO_MORE_EVENTS
Indicates that no more job events will be send.
static intREQUIRES_ATTENTION
Indicates a situation where human intervention might be needed.
Constructor Summary
PrintJobEvent(DocPrintJob source, int reason)
Constructs a PrintJobEvent object.
Method Summary
intgetPrintEventType()
Returns the reason for this event.
DocPrintJobgetPrintJob()
Returns the print job that generated this event.

Field Detail

DATA_TRANSFER_COMPLETE

public static final int DATA_TRANSFER_COMPLETE
Indicates that the data transfer to the print service has completed.

JOB_CANCELED

public static final int JOB_CANCELED
Indicates that the print job was canceled.

JOB_COMPLETE

public static final int JOB_COMPLETE
Indicates that the print job was completed (=printed).

JOB_FAILED

public static final int JOB_FAILED
Indicates that the print job failed to complete.

NO_MORE_EVENTS

public static final int NO_MORE_EVENTS
Indicates that no more job events will be send.

REQUIRES_ATTENTION

public static final int REQUIRES_ATTENTION
Indicates a situation where human intervention might be needed. E.g. the printer run out of paper or a paper jam occured.

Constructor Detail

PrintJobEvent

public PrintJobEvent(DocPrintJob source, int reason)
Constructs a PrintJobEvent object.

Parameters: source the source generating this event reason the reason for this event

Method Detail

getPrintEventType

public int getPrintEventType()
Returns the reason for this event.

Returns: The reason.

getPrintJob

public DocPrintJob getPrintJob()
Returns the print job that generated this event.

Returns: The print job.