javax.print.event
Class PrintJobEvent

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject 
      extended by javax.print.event.PrintEvent sample code for javax.print.event.PrintEvent definition code for javax.print.event.PrintEvent 
          extended by javax.print.event.PrintJobEvent
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class PrintJobEvent
extends PrintEvent sample code for javax.print.event.PrintEvent definition code for javax.print.event.PrintEvent

Class PrintJobEvent encapsulates common events a print job reports to let a listener know of progress in the processing of the DocPrintJob sample code for javax.print.DocPrintJob definition code for javax.print.DocPrintJob .

See Also:
Serialized Form

Field Summary
static int DATA_TRANSFER_COMPLETE sample code for javax.print.event.PrintJobEvent.DATA_TRANSFER_COMPLETE definition code for javax.print.event.PrintJobEvent.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 sample code for javax.print.event.PrintJobEvent.JOB_CANCELED definition code for javax.print.event.PrintJobEvent.JOB_CANCELED
          The job was canceled by the PrintService sample code for javax.print.PrintService definition code for javax.print.PrintService .
static int JOB_COMPLETE sample code for javax.print.event.PrintJobEvent.JOB_COMPLETE definition code for javax.print.event.PrintJobEvent.JOB_COMPLETE
          The document cis completely printed.
static int JOB_FAILED sample code for javax.print.event.PrintJobEvent.JOB_FAILED definition code for javax.print.event.PrintJobEvent.JOB_FAILED
          The print service reports that the job cannot be completed.
static int NO_MORE_EVENTS sample code for javax.print.event.PrintJobEvent.NO_MORE_EVENTS definition code for javax.print.event.PrintJobEvent.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 sample code for javax.print.event.PrintJobEvent.REQUIRES_ATTENTION definition code for javax.print.event.PrintJobEvent.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 sample code for java.util.EventObject definition code for java.util.EventObject
source sample code for java.util.EventObject.source definition code for java.util.EventObject.source
 
Constructor Summary
PrintJobEvent sample code for javax.print.event.PrintJobEvent.PrintJobEvent(javax.print.DocPrintJob, int) definition code for javax.print.event.PrintJobEvent.PrintJobEvent(javax.print.DocPrintJob, int) (DocPrintJob sample code for javax.print.DocPrintJob definition code for javax.print.DocPrintJob  source, int reason)
          Constructs a PrintJobEvent object.
 
Method Summary
 int getPrintEventType sample code for javax.print.event.PrintJobEvent.getPrintEventType() definition code for javax.print.event.PrintJobEvent.getPrintEventType() ()
          Gets the reason for this event.
 DocPrintJob sample code for javax.print.DocPrintJob definition code for javax.print.DocPrintJob getPrintJob sample code for javax.print.event.PrintJobEvent.getPrintJob() definition code for javax.print.event.PrintJobEvent.getPrintJob() ()
          Determines the DocPrintJob to which this print job event pertains.
 
Methods inherited from class javax.print.event.PrintEvent sample code for javax.print.event.PrintEvent definition code for javax.print.event.PrintEvent
toString sample code for javax.print.event.PrintEvent.toString() definition code for javax.print.event.PrintEvent.toString()
 
Methods inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
getSource sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

JOB_CANCELED sample code for javax.print.event.PrintJobEvent.JOB_CANCELED

public static final int JOB_CANCELED
The job was canceled by the PrintService sample code for javax.print.PrintService definition code for javax.print.PrintService .

See Also:
Constant Field Values

JOB_COMPLETE sample code for javax.print.event.PrintJobEvent.JOB_COMPLETE

public static final int JOB_COMPLETE
The document cis completely printed.

See Also:
Constant Field Values

JOB_FAILED sample code for javax.print.event.PrintJobEvent.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 sample code for javax.print.event.PrintJobEvent.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 sample code for javax.print.event.PrintJobEvent.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 sample code for javax.print.event.PrintJobEvent.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 sample code for javax.print.event.PrintJobEvent(javax.print.DocPrintJob, int) definition code for javax.print.event.PrintJobEvent(javax.print.DocPrintJob, int)

public PrintJobEvent(DocPrintJob sample code for javax.print.DocPrintJob definition code for javax.print.DocPrintJob  source,
                     int reason)
Constructs a PrintJobEvent object.

Parameters:
source - a DocPrintJob object
reason - an int specifying the reason.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if source is null.
Method Detail

getPrintEventType sample code for javax.print.event.PrintJobEvent.getPrintEventType() definition code for javax.print.event.PrintJobEvent.getPrintEventType()

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

Returns:
reason int.

getPrintJob sample code for javax.print.event.PrintJobEvent.getPrintJob() definition code for javax.print.event.PrintJobEvent.getPrintJob()

public DocPrintJob sample code for javax.print.DocPrintJob definition code for javax.print.DocPrintJob  getPrintJob()
Determines the DocPrintJob to which this print job event pertains.

Returns:
the DocPrintJob object that represents the print job that reports the events encapsulated by this PrintJobEvent.