com.darwinsys.swingui
Class WindowCloser

java.lang.Object
  extended by java.awt.event.WindowAdapter
      extended by com.darwinsys.swingui.WindowCloser
All Implemented Interfaces:
java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.util.EventListener

Deprecated. For simple closing, just use JFrame.setDefaultCloseOperation().

public class WindowCloser
extends java.awt.event.WindowAdapter

A WindowCloser - watch for Window Closing events, and follow them up with setVisible(false), dispose(), and optionally ends (it all) with a System.exit(0).

Version:
$Id: WindowCloser.java,v 1.7 2003/05/29 18:06:31 ian Exp $
Author:
Ian F. Darwin

Constructor Summary
WindowCloser(java.awt.Window w)
          Deprecated. Construct a WindowCloser that doesn't exit, just closes the window
WindowCloser(java.awt.Window w, boolean exit)
          Deprecated. Construct a WindowCloser with control over whether it exits
 
Method Summary
 void windowClosing(java.awt.event.WindowEvent e)
          Deprecated. Called by AWT when the user tries to close the window
 
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowCloser

public WindowCloser(java.awt.Window w)
Deprecated. 
Construct a WindowCloser that doesn't exit, just closes the window


WindowCloser

public WindowCloser(java.awt.Window w,
                    boolean exit)
Deprecated. 
Construct a WindowCloser with control over whether it exits

Method Detail

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Deprecated. 
Called by AWT when the user tries to close the window

Specified by:
windowClosing in interface java.awt.event.WindowListener
Overrides:
windowClosing in class java.awt.event.WindowAdapter


Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.