public class PrintJobEvent extends PrintEvent
Class PrintJobEvent
encapsulates common events a print job reports to let a listener know of progress in the processing of the DocPrintJob
.
public static final int JOB_CANCELED
The job was canceled by the PrintService
.
public static final int JOB_COMPLETE
The document cis completely printed.
public static final int JOB_FAILED
The print service reports that the job cannot be completed. The application must resubmit the job.
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.
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.
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.
public PrintJobEvent(DocPrintJob source, int reason)
Constructs a PrintJobEvent
object.
source
- a DocPrintJob
objectreason
- an int specifying the reason.IllegalArgumentException
- if source
is null
.public int getPrintEventType()
Gets the reason for this event.
public DocPrintJob getPrintJob()
Determines the DocPrintJob
to which this print job event pertains.
DocPrintJob
object that represents the print job that reports the events encapsulated by this PrintJobEvent
.
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.