27
28 import java.util.EventListener;
29
30 /**
31 * The listener interface for receiving window events.
32 * The class that is interested in processing a window event
33 * either implements this interface (and all the methods it
34 * contains) or extends the abstract <code>WindowAdapter</code> class
35 * (overriding only the methods of interest).
36 * The listener object created from that class is then registered with a
37 * Window using the window's <code>addWindowListener</code>
38 * method. When the window's status changes by virtue of being opened,
39 * closed, activated or deactivated, iconified or deiconified,
40 * the relevant method in the listener object is invoked, and the
41 * <code>WindowEvent</code> is passed to it.
42 *
43 * @author Carl Quinn
44 *
45 * @see WindowAdapter
46 * @see WindowEvent
47 * @see <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/windowlistener.html">Tutorial: How to Write Window Listeners</a>
48 *
49 * @since 1.1
50 */
51 public interface WindowListener extends EventListener {
52 /**
53 * Invoked the first time a window is made visible.
54 */
55 public void windowOpened(WindowEvent e);
56
57 /**
58 * Invoked when the user attempts to close the window
59 * from the window's system menu.
60 */
61 public void windowClosing(WindowEvent e);
62
63 /**
64 * Invoked when a window has been closed as the result
65 * of calling dispose on the window.
66 */
67 public void windowClosed(WindowEvent e);
|
27
28 import java.util.EventListener;
29
30 /**
31 * The listener interface for receiving window events.
32 * The class that is interested in processing a window event
33 * either implements this interface (and all the methods it
34 * contains) or extends the abstract <code>WindowAdapter</code> class
35 * (overriding only the methods of interest).
36 * The listener object created from that class is then registered with a
37 * Window using the window's <code>addWindowListener</code>
38 * method. When the window's status changes by virtue of being opened,
39 * closed, activated or deactivated, iconified or deiconified,
40 * the relevant method in the listener object is invoked, and the
41 * <code>WindowEvent</code> is passed to it.
42 *
43 * @author Carl Quinn
44 *
45 * @see WindowAdapter
46 * @see WindowEvent
47 * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/windowlistener.html">Tutorial: How to Write Window Listeners</a>
48 *
49 * @since 1.1
50 */
51 public interface WindowListener extends EventListener {
52 /**
53 * Invoked the first time a window is made visible.
54 */
55 public void windowOpened(WindowEvent e);
56
57 /**
58 * Invoked when the user attempts to close the window
59 * from the window's system menu.
60 */
61 public void windowClosing(WindowEvent e);
62
63 /**
64 * Invoked when a window has been closed as the result
65 * of calling dispose on the window.
66 */
67 public void windowClosed(WindowEvent e);
|