home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / awt / event / WindowAdapter.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  2.7 KB  |  81 lines

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