Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.desktop/share/classes/javax/print/event/PrintJobAdapter.java
41159 views
1
/*
2
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation. Oracle designates this
8
* particular file as subject to the "Classpath" exception as provided
9
* by Oracle in the LICENSE file that accompanied this code.
10
*
11
* This code is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* version 2 for more details (a copy is included in the LICENSE file that
15
* accompanied this code).
16
*
17
* You should have received a copy of the GNU General Public License version
18
* 2 along with this work; if not, write to the Free Software Foundation,
19
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
*
21
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
* or visit www.oracle.com if you need additional information or have any
23
* questions.
24
*/
25
26
package javax.print.event;
27
28
/**
29
* An abstract adapter class for receiving print job events. The methods in this
30
* class are empty. This class exists as a convenience for creating listener
31
* objects. Extend this class to create a {@link PrintJobEvent} listener and
32
* override the methods for the events of interest. Unlike the
33
* {@link java.awt.event.ComponentListener ComponentListener} interface, this
34
* abstract interface provides empty methods so that you only need to define the
35
* methods you need, rather than all of the methods.
36
*/
37
public abstract class PrintJobAdapter implements PrintJobListener {
38
39
/**
40
* Constructor for subclasses to call.
41
*/
42
protected PrintJobAdapter() {}
43
44
/**
45
* Called to notify the client that data has been successfully transferred
46
* to the print service, and the client may free local resources allocated
47
* for that data. The client should not assume that the data has been
48
* completely printed after receiving this event.
49
*
50
* @param pje the event being notified
51
*/
52
public void printDataTransferCompleted(PrintJobEvent pje) {
53
}
54
55
/**
56
* Called to notify the client that the job completed successfully.
57
*
58
* @param pje the event being notified
59
*/
60
public void printJobCompleted(PrintJobEvent pje) {
61
}
62
63
/**
64
* Called to notify the client that the job failed to complete successfully
65
* and will have to be resubmitted.
66
*
67
* @param pje the event being notified
68
*/
69
public void printJobFailed(PrintJobEvent pje) {
70
}
71
72
/**
73
* Called to notify the client that the job was canceled by user or program.
74
*
75
* @param pje the event being notified
76
*/
77
public void printJobCanceled(PrintJobEvent pje) {
78
}
79
80
/**
81
* Called to notify the client that no more events will be delivered. One
82
* cause of this event being generated is if the job has successfully
83
* completed, but the printing system is limited in capability and cannot
84
* verify this. This event is required to be delivered if none of the other
85
* terminal events (completed/failed/canceled) are delivered.
86
*
87
* @param pje the event being notified
88
*/
89
public void printJobNoMoreEvents(PrintJobEvent pje) {
90
}
91
92
/**
93
* Called to notify the client that some possibly user rectifiable problem
94
* occurs (eg printer out of paper).
95
*
96
* @param pje the event being notified
97
*/
98
public void printJobRequiresAttention(PrintJobEvent pje) {
99
}
100
}
101
102