Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/print/event/PrintJobAdapter.java
38830 views
/*1* Copyright (c) 2000, 2001, 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.29* The methods in this class are empty.30* This class exists as a convenience for creating listener objects.31* Extend this class to create a {@link PrintJobEvent} listener and override32* the methods for the events of interest. Unlike the33* {@link java.awt.event.ComponentListener ComponentListener}34* interface, this abstract interface provides null methods so that you35* only need to define the methods you need, rather than all of the methods.36*37*/3839public abstract class PrintJobAdapter implements PrintJobListener {4041/**42* Called to notify the client that data has been successfully43* transferred to the print service, and the client may free44* local resources allocated for that data. The client should45* not assume that the data has been completely printed after46* receiving this event.47*48* @param pje the event being notified49*/50public void printDataTransferCompleted(PrintJobEvent pje) {51}5253/**54* Called to notify the client that the job completed successfully.55*56* @param pje the event being notified57*/58public void printJobCompleted(PrintJobEvent pje) {59}606162/**63* Called to notify the client that the job failed to complete64* successfully 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 canceled73* by user or program.74*75* @param pje the event being notified76*/77public void printJobCanceled(PrintJobEvent pje) {78}798081/**82* Called to notify the client that no more events will be delivered.83* One cause of this event being generated is if the job84* has successfully completed, but the printing system85* is limited in capability and cannot verify this.86* This event is required to be delivered if none of the other87* terminal events (completed/failed/canceled) are delivered.88*89* @param pje the event being notified90*/91public void printJobNoMoreEvents(PrintJobEvent pje) {92}939495/**96* Called to notify the client that some possibly user rectifiable97* problem occurs (eg printer out of paper).98*99* @param pje the event being notified100*/101public void printJobRequiresAttention(PrintJobEvent pje) {102}103104}105106107