Package org.ka2ddo.yaac.gui.util
Class CloseContentOnWindowClose
java.lang.Object
java.awt.event.WindowAdapter
org.ka2ddo.yaac.gui.util.CloseContentOnWindowClose
- All Implemented Interfaces:
WindowFocusListener
,WindowListener
,WindowStateListener
,EventListener
This class provides a common function of closing down the dynamic contents of a closed
Window. Windows that are real-time monitoring traffic can be deregistered automatically
upon close.
- Author:
- Andrew Pavlin, KA2DDO
-
Constructor Summary
ConstructorDescriptionCloseContentOnWindowClose
(Closeable content) Create a WindowListener that will release resources owned by the window when it is closed. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked when a window has been closed.Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosing, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
-
Constructor Details
-
CloseContentOnWindowClose
Create a WindowListener that will release resources owned by the window when it is closed.- Parameters:
content
- Closeable object to close when the Window this listener is attached to is closed
-
-
Method Details
-
windowClosed
Invoked when a window has been closed.- Specified by:
windowClosed
in interfaceWindowListener
- Overrides:
windowClosed
in classWindowAdapter
-