1. /*
  2. * @(#)PrintJobAdapter.java 1.6 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.print.event;
  8. /**
  9. * An abstract adapter class for receiving print job events.
  10. * The methods in this class are empty.
  11. * This class exists as a convenience for creating listener objects.
  12. * Extend this class to create a {@link PrintJobEvent} listener and override
  13. * the methods for the events of interest. Unlike the
  14. * {@link java.awt.event.ComponentListener ComponentListener}
  15. * interface, this abstract interface provides null methods so that you
  16. * only need to define the methods you need, rather than all of the methods.
  17. *
  18. */
  19. public abstract class PrintJobAdapter implements PrintJobListener {
  20. /**
  21. * Called to notify the client that data has been successfully
  22. * transferred to the print service, and the client may free
  23. * local resources allocated for that data. The client should
  24. * not assume that the data has been completely printed after
  25. * receiving this event.
  26. *
  27. * @param pje the event being notified
  28. */
  29. public void printDataTransferCompleted(PrintJobEvent pje) {
  30. }
  31. /**
  32. * Called to notify the client that the job completed successfully.
  33. *
  34. * @param pje the event being notified
  35. */
  36. public void printJobCompleted(PrintJobEvent pje) {
  37. }
  38. /**
  39. * Called to notify the client that the job failed to complete
  40. * successfully and will have to be resubmitted.
  41. *
  42. * @param pje the event being notified
  43. */
  44. public void printJobFailed(PrintJobEvent pje) {
  45. }
  46. /**
  47. * Called to notify the client that the job was canceled
  48. * by user or program.
  49. *
  50. * @param pje the event being notified
  51. */
  52. public void printJobCanceled(PrintJobEvent pje) {
  53. }
  54. /**
  55. * Called to notify the client that no more events will be delivered.
  56. * One cause of this event being generated is if the job
  57. * has successfully completed, but the printing system
  58. * is limited in capability and cannot verify this.
  59. * This event is required to be delivered if none of the other
  60. * terminal events (completed/failed/canceled) are delivered.
  61. *
  62. * @param pje the event being notified
  63. */
  64. public void printJobNoMoreEvents(PrintJobEvent pje) {
  65. }
  66. /**
  67. * Called to notify the client that some possibly user rectifiable
  68. * problem occurs (eg printer out of paper).
  69. *
  70. * @param pje the event being notified
  71. */
  72. public void printJobRequiresAttention(PrintJobEvent pje) {
  73. }
  74. }