Package org.jdesktop.application
Interface Application.ExitListener
-
- All Superinterfaces:
java.util.EventListener
- Enclosing class:
- Application
public static interface Application.ExitListener extends java.util.EventListener
Gives the Application a chance to veto an attempt to exit/quit. AnExitListener's
canExit
method should return false if there are pending decisions that the user must make before the app exits. A typicalExitListener
would prompt the user with a modal dialog.The
eventObject
argument will be the the value passed toexit()
. It may be null.The
willExit
method is called after the exit has been confirmed. An ExitListener that's going to perform some cleanup work should do so inwillExit
.ExitListeners
run on the event dispatching thread.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canExit(java.util.EventObject event)
The method is called before the Application exits.void
willExit(java.util.EventObject event)
The method is called after the exit has been confirmed.
-
-
-
Method Detail
-
canExit
boolean canExit(java.util.EventObject event)
The method is called before the Application exits.- Parameters:
event
- theEventObject
object. It will be the the value passed toexit()
.- Returns:
true
if application can proceed with shutdown process;false
if there are pending decisions that the user must make before the app exits.
-
willExit
void willExit(java.util.EventObject event)
The method is called after the exit has been confirmed.- Parameters:
event
- theEventObject
object. It will be the the value passed toexit()
.
-
-