< prev index next >

src/java.desktop/share/classes/javax/print/event/PrintJobAdapter.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2017, 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      * Called to notify the client that data has been successfully transferred
  41      * to the print service, and the client may free local resources allocated
  42      * for that data. The client should not assume that the data has been
  43      * completely printed after receiving this event.
  44      *
  45      * @param  pje the event being notified
  46      */
  47     public void printDataTransferCompleted(PrintJobEvent pje)  {
  48     }
  49 
  50     /**
  51      * Called to notify the client that the job completed successfully.
  52      *
  53      * @param  pje the event being notified
  54      */
  55     public void printJobCompleted(PrintJobEvent pje)  {
  56     }
  57 


   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     public 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 


< prev index next >