Package noaa.coastwatch.gui
Class WindowMonitor
java.lang.Object
java.awt.event.WindowAdapter
noaa.coastwatch.gui.WindowMonitor
- All Implemented Interfaces:
WindowFocusListener
,WindowListener
,WindowStateListener
,EventListener
The window monitor class performs a system exit when it receives the window closing event. This is generally only desirable if the closing window is the main application window.
As an example, the following code shows the window monitor being used for a frame:
JFrame frame = new JFrame(); frame.addWindowListener (new WindowMonitor());
- Since:
- 3.1.2
- Author:
- Peter Hollemans
-
Constructor Summary
-
Method Summary
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
-
Constructor Details
-
WindowMonitor
public WindowMonitor()
-
-
Method Details
-
windowClosing
- Specified by:
windowClosing
in interfaceWindowListener
- Overrides:
windowClosing
in classWindowAdapter
-