java.lang.Object
java.util.EventObject
javax.print.event.PrintEvent
javax.print.event.PrintJobEvent
- All Implemented Interfaces:
Serializable
Class
PrintJobEvent
encapsulates common events a print job reports to
let a listener know of progress in the processing of the DocPrintJob
.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The job is not necessarily printed yet, but the data has been transferred successfully from the client to the print service.static final int
The job was canceled by thePrintService
.static final int
The document is completely printed.static final int
The print service reports that the job cannot be completed.static final int
Not all print services may be capable of delivering interesting events, or even telling when a job is complete.static final int
The print service indicates that a - possibly transient - problem may require external intervention before the print service can continue.Fields declared in class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionPrintJobEvent
(DocPrintJob source, int reason) Constructs aPrintJobEvent
object. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the reason for this event.Determines theDocPrintJob
to which this print job event pertains.Methods declared in class javax.print.event.PrintEvent
toString
Methods declared in class java.util.EventObject
getSource
-
Field Details
-
JOB_CANCELED
public static final int JOB_CANCELEDThe job was canceled by thePrintService
.- See Also:
-
JOB_COMPLETE
public static final int JOB_COMPLETEThe document is completely printed.- See Also:
-
JOB_FAILED
public static final int JOB_FAILEDThe print service reports that the job cannot be completed. The application must resubmit the job.- See Also:
-
REQUIRES_ATTENTION
public static final int REQUIRES_ATTENTIONThe print service indicates that a - possibly transient - problem may require external intervention before the print service can continue. One example of an event that can generate this message is when the printer runs out of paper.- See Also:
-
NO_MORE_EVENTS
public static final int NO_MORE_EVENTSNot all print services may be capable of delivering interesting events, or even telling when a job is complete. This message indicates the print job has no further information or communication with the print service. This message should always be delivered if a terminal event (completed/failed/canceled) is not delivered. For example, if messages such asJOB_COMPLETE
have NOT been received before receiving this message, the only inference that should be drawn is that the print service does not support delivering such an event.- See Also:
-
DATA_TRANSFER_COMPLETE
public static final int DATA_TRANSFER_COMPLETEThe job is not necessarily printed yet, but the data has been transferred successfully from the client to the print service. The client may free data resources.- See Also:
-
-
Constructor Details
-
PrintJobEvent
Constructs aPrintJobEvent
object.- Parameters:
source
- aDocPrintJob
objectreason
- an int specifying the reason- Throws:
IllegalArgumentException
- ifsource
isnull
-
-
Method Details
-
getPrintEventType
public int getPrintEventType()Gets the reason for this event.- Returns:
- reason int
-
getPrintJob
Determines theDocPrintJob
to which this print job event pertains.- Returns:
- the
DocPrintJob
object that represents the print job that reports the events encapsulated by thisPrintJobEvent
-