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