Path: blob/master/src/java.desktop/share/classes/javax/print/event/PrintJobAdapter.java
41159 views
/*1* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.print.event;2627/**28* An abstract adapter class for receiving print job events. The methods in this29* class are empty. This class exists as a convenience for creating listener30* objects. Extend this class to create a {@link PrintJobEvent} listener and31* override the methods for the events of interest. Unlike the32* {@link java.awt.event.ComponentListener ComponentListener} interface, this33* abstract interface provides empty methods so that you only need to define the34* methods you need, rather than all of the methods.35*/36public abstract class PrintJobAdapter implements PrintJobListener {3738/**39* Constructor for subclasses to call.40*/41protected PrintJobAdapter() {}4243/**44* Called to notify the client that data has been successfully transferred45* to the print service, and the client may free local resources allocated46* for that data. The client should not assume that the data has been47* completely printed after receiving this event.48*49* @param pje the event being notified50*/51public void printDataTransferCompleted(PrintJobEvent pje) {52}5354/**55* Called to notify the client that the job completed successfully.56*57* @param pje the event being notified58*/59public void printJobCompleted(PrintJobEvent pje) {60}6162/**63* Called to notify the client that the job failed to complete successfully64* and will have to be resubmitted.65*66* @param pje the event being notified67*/68public void printJobFailed(PrintJobEvent pje) {69}7071/**72* Called to notify the client that the job was canceled by user or program.73*74* @param pje the event being notified75*/76public void printJobCanceled(PrintJobEvent pje) {77}7879/**80* Called to notify the client that no more events will be delivered. One81* cause of this event being generated is if the job has successfully82* completed, but the printing system is limited in capability and cannot83* verify this. This event is required to be delivered if none of the other84* terminal events (completed/failed/canceled) are delivered.85*86* @param pje the event being notified87*/88public void printJobNoMoreEvents(PrintJobEvent pje) {89}9091/**92* Called to notify the client that some possibly user rectifiable problem93* occurs (eg printer out of paper).94*95* @param pje the event being notified96*/97public void printJobRequiresAttention(PrintJobEvent pje) {98}99}100101102