KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > print > event > PrintJobAdapter


1 /*
2  * @(#)PrintJobAdapter.java 1.6 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.print.event;
9
10 /**
11   * An abstract adapter class for receiving print job events.
12   * The methods in this class are empty.
13   * This class exists as a convenience for creating listener objects.
14   * Extend this class to create a {@link PrintJobEvent} listener and override
15   * the methods for the events of interest. Unlike the
16   * {@link java.awt.event.ComponentListener ComponentListener}
17   * interface, this abstract interface provides null methods so that you
18   * only need to define the methods you need, rather than all of the methods.
19   *
20   */

21
22 public abstract class PrintJobAdapter implements PrintJobListener JavaDoc {
23
24     /**
25      * Called to notify the client that data has been successfully
26      * transferred to the print service, and the client may free
27      * local resources allocated for that data. The client should
28      * not assume that the data has been completely printed after
29      * receiving this event.
30      *
31      * @param pje the event being notified
32      */

33     public void printDataTransferCompleted(PrintJobEvent JavaDoc pje) {
34     }
35
36     /**
37      * Called to notify the client that the job completed successfully.
38      *
39      * @param pje the event being notified
40      */

41     public void printJobCompleted(PrintJobEvent JavaDoc pje) {
42     }
43
44
45     /**
46      * Called to notify the client that the job failed to complete
47      * successfully and will have to be resubmitted.
48      *
49      * @param pje the event being notified
50      */

51     public void printJobFailed(PrintJobEvent JavaDoc pje) {
52     }
53
54     /**
55      * Called to notify the client that the job was canceled
56      * by user or program.
57      *
58      * @param pje the event being notified
59      */

60     public void printJobCanceled(PrintJobEvent JavaDoc pje) {
61     }
62
63  
64     /**
65      * Called to notify the client that no more events will be delivered.
66      * One cause of this event being generated is if the job
67      * has successfully completed, but the printing system
68      * is limited in capability and cannot verify this.
69      * This event is required to be delivered if none of the other
70      * terminal events (completed/failed/canceled) are delivered.
71      *
72      * @param pje the event being notified
73      */

74     public void printJobNoMoreEvents(PrintJobEvent JavaDoc pje) {
75     }
76  
77  
78     /**
79      * Called to notify the client that some possibly user rectifiable
80      * problem occurs (eg printer out of paper).
81      *
82      * @param pje the event being notified
83      */

84     public void printJobRequiresAttention(PrintJobEvent JavaDoc pje) {
85     }
86  
87 }
88
Popular Tags