- java.lang.Object
-
- java.util.EventObject
-
- javax.print.event.PrintEvent
-
- javax.print.event.PrintJobEvent
-
- All Implemented Interfaces:
- Serializable
public class PrintJobEvent extends PrintEvent
ClassPrintJobEvent
encapsulates common events a print job reports to let a listener know of progress in the processing of theDocPrintJob
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static 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.static int
JOB_CANCELED
The job was canceled by thePrintService
.static int
JOB_COMPLETE
The document cis completely printed.static int
JOB_FAILED
The print service reports that the job cannot be completed.static int
NO_MORE_EVENTS
Not all print services may be capable of delivering interesting events, or even telling when a job is complete.static int
REQUIRES_ATTENTION
The print service indicates that a - possibly transient - problem may require external intervention before the print service can continue.-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor and Description PrintJobEvent(DocPrintJob source, int reason)
Constructs aPrintJobEvent
object.
-
Method Summary
Methods Modifier and Type Method and Description int
getPrintEventType()
Gets the reason for this event.DocPrintJob
getPrintJob()
Determines theDocPrintJob
to which this print job event pertains.-
Methods inherited from class javax.print.event.PrintEvent
toString
-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Field Detail
-
JOB_CANCELED
public static final int JOB_CANCELED
The job was canceled by thePrintService
.- See Also:
- Constant Field Values
-
JOB_COMPLETE
public static final int JOB_COMPLETE
The document cis completely printed.- See Also:
- Constant Field Values
-
JOB_FAILED
public 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_ATTENTION
public 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_EVENTS
public 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 as JOB_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:
- Constant Field Values
-
DATA_TRANSFER_COMPLETE
public 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
-
PrintJobEvent
public PrintJobEvent(DocPrintJob source, int reason)
Constructs aPrintJobEvent
object.- Parameters:
source
- aDocPrintJob
objectreason
- an int specifying the reason.- Throws:
IllegalArgumentException
- ifsource
isnull
.
-
-
Method Detail
-
getPrintEventType
public int getPrintEventType()
Gets the reason for this event.- Returns:
- reason int.
-
getPrintJob
public DocPrintJob 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
.
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/print/event/PrintJobEvent.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.