1. /*
  2. * @(#)WindowAdapter.java 1.15 00/02/02
  3. *
  4. * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package java.awt.event;
  11. /**
  12. * An abstract adapter class for receiving window events.
  13. * The methods in this class are empty. This class exists as
  14. * convenience for creating listener objects.
  15. * <P>
  16. * Extend this class to create a <code>WindowEvent</code> listener
  17. * and override the methods for the events of interest. (If you implement the
  18. * <code>WindowListener</code> interface, you have to define all of
  19. * the methods in it. This abstract class defines null methods for them
  20. * all, so you can only have to define methods for events you care about.)
  21. * <P>
  22. * Create a listener object using the extended class and then register it with
  23. * a Window using the window's <code>addWindowListener</code>
  24. * method. When the window's status changes by virtue of being opened,
  25. * closed, activated or deactivated, iconified or deiconified,
  26. * the relevant method in the listener
  27. * object is invoked, and the <code>WindowEvent</code> is passed to it.
  28. *
  29. * @see WindowEvent
  30. * @see WindowListener
  31. * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/windowlistener.html">Tutorial: Writing a Window Listener</a>
  32. * @see <a href="http://www.awl.com/cp/javaseries/jcl1_2.html">Reference: The Java Class Libraries (update file)</a>
  33. *
  34. * @author Carl Quinn
  35. * @author Amy Fowler
  36. * @version 1.15, 02/02/00
  37. * @since 1.1
  38. */
  39. public abstract class WindowAdapter implements WindowListener {
  40. /**
  41. * Invoked when a window has been opened.
  42. */
  43. public void windowOpened(WindowEvent e) {}
  44. /**
  45. * Invoked when a window is in the process of being closed.
  46. * The close operation can be overridden at this point.
  47. */
  48. public void windowClosing(WindowEvent e) {}
  49. /**
  50. * Invoked when a window has been closed.
  51. */
  52. public void windowClosed(WindowEvent e) {}
  53. /**
  54. * Invoked when a window is iconified.
  55. */
  56. public void windowIconified(WindowEvent e) {}
  57. /**
  58. * Invoked when a window is de-iconified.
  59. */
  60. public void windowDeiconified(WindowEvent e) {}
  61. /**
  62. * Invoked when a window is activated.
  63. */
  64. public void windowActivated(WindowEvent e) {}
  65. /**
  66. * Invoked when a window is de-activated.
  67. */
  68. public void windowDeactivated(WindowEvent e) {}
  69. }