1 |
/* PrintEvent.java -- |
/* PrintEvent.java -- |
2 |
Copyright (C) 2004 Free Software Foundation, Inc. |
Copyright (C) 2004, 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
41 |
|
|
42 |
|
|
43 |
/** |
/** |
44 |
|
* <code>PrintJobEvent</code>s are generated by a print job during |
45 |
|
* print job processing to inform registered listeners about the state |
46 |
|
* of processing. |
47 |
|
* |
48 |
* @author Michael Koch (konqueror@gmx.de) |
* @author Michael Koch (konqueror@gmx.de) |
49 |
*/ |
*/ |
50 |
public class PrintJobEvent extends PrintEvent |
public class PrintJobEvent extends PrintEvent |
51 |
{ |
{ |
52 |
private static final long serialVersionUID = -1711656903622072997L; |
private static final long serialVersionUID = -1711656903622072997L; |
53 |
|
|
54 |
|
/** Indicates that the data transfer to the print service has completed. */ |
55 |
public static final int DATA_TRANSFER_COMPLETE = 106; |
public static final int DATA_TRANSFER_COMPLETE = 106; |
56 |
|
|
57 |
|
/** Indicates that the print job was canceled. */ |
58 |
public static final int JOB_CANCELED = 101; |
public static final int JOB_CANCELED = 101; |
59 |
|
|
60 |
|
/** Indicates that the print job was completed (=printed). */ |
61 |
public static final int JOB_COMPLETE = 102; |
public static final int JOB_COMPLETE = 102; |
62 |
|
|
63 |
|
/** Indicates that the print job failed to complete. */ |
64 |
public static final int JOB_FAILED = 103; |
public static final int JOB_FAILED = 103; |
65 |
|
|
66 |
|
/** Indicates that no more job events will be send.*/ |
67 |
public static final int NO_MORE_EVENTS = 105; |
public static final int NO_MORE_EVENTS = 105; |
68 |
|
|
69 |
|
/** |
70 |
|
* Indicates a situation where human intervention might be needed. |
71 |
|
* E.g. the printer run out of paper or a paper jam occured. |
72 |
|
*/ |
73 |
public static final int REQUIRES_ATTENTION = 104; |
public static final int REQUIRES_ATTENTION = 104; |
74 |
|
|
75 |
|
/** The reason (one of the defined constants). */ |
76 |
private int reason; |
private int reason; |
77 |
|
|
78 |
/** |
/** |
90 |
/** |
/** |
91 |
* Returns the reason for this event. |
* Returns the reason for this event. |
92 |
* |
* |
93 |
* @return the reason |
* @return The reason. |
94 |
*/ |
*/ |
95 |
public int getPrintEventType() |
public int getPrintEventType() |
96 |
{ |
{ |
100 |
/** |
/** |
101 |
* Returns the print job that generated this event. |
* Returns the print job that generated this event. |
102 |
* |
* |
103 |
* @return the print job |
* @return The print job. |
104 |
*/ |
*/ |
105 |
public DocPrintJob getPrintJob() |
public DocPrintJob getPrintJob() |
106 |
{ |
{ |