- java.lang.Object
- 
- java.util.EventObject
- 
- javax.print.event.PrintEvent
- 
- javax.print.event.PrintJobEvent
 
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class PrintJobEvent extends PrintEvent ClassPrintJobEventencapsulates common events a print job reports to let a listener know of progress in the processing of theDocPrintJob.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intDATA_TRANSFER_COMPLETEThe job is not necessarily printed yet, but the data has been transferred successfully from the client to the print service.static intJOB_CANCELEDThe job was canceled by thePrintService.static intJOB_COMPLETEThe document is completely printed.static intJOB_FAILEDThe print service reports that the job cannot be completed.static intNO_MORE_EVENTSNot all print services may be capable of delivering interesting events, or even telling when a job is complete.static intREQUIRES_ATTENTIONThe print service indicates that a - possibly transient - problem may require external intervention before the print service can continue.- 
Fields declared in class java.util.EventObjectsource
 
- 
 - 
Constructor SummaryConstructors Constructor Description PrintJobEvent(DocPrintJob source, int reason)Constructs aPrintJobEventobject.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPrintEventType()Gets the reason for this event.DocPrintJobgetPrintJob()Determines theDocPrintJobto which this print job event pertains.- 
Methods declared in class javax.print.event.PrintEventtoString
 - 
Methods declared in class java.util.EventObjectgetSource
 
- 
 
- 
- 
- 
Field Detail- 
JOB_CANCELEDpublic static final int JOB_CANCELED The job was canceled by thePrintService.- See Also:
- Constant Field Values
 
 - 
JOB_COMPLETEpublic static final int JOB_COMPLETE The document is completely printed.- See Also:
- Constant Field Values
 
 - 
JOB_FAILEDpublic static final int JOB_FAILED The print service reports that the job cannot be completed. The application must resubmit the job.- See Also:
- Constant Field Values
 
 - 
REQUIRES_ATTENTIONpublic static final int REQUIRES_ATTENTION The 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:
- Constant Field Values
 
 - 
NO_MORE_EVENTSpublic static final int NO_MORE_EVENTS Not 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_COMPLETEhave 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:
- Constant Field Values
 
 - 
DATA_TRANSFER_COMPLETEpublic static final int DATA_TRANSFER_COMPLETE The 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:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
PrintJobEventpublic PrintJobEvent(DocPrintJob source, int reason) Constructs aPrintJobEventobject.- Parameters:
- source- a- DocPrintJobobject
- reason- an int specifying the reason
- Throws:
- IllegalArgumentException- if- sourceis- null
 
 
- 
 - 
Method Detail- 
getPrintEventTypepublic int getPrintEventType() Gets the reason for this event.- Returns:
- reason int
 
 - 
getPrintJobpublic DocPrintJob getPrintJob() Determines theDocPrintJobto which this print job event pertains.- Returns:
- the DocPrintJobobject that represents the print job that reports the events encapsulated by thisPrintJobEvent
 
 
- 
 
-