Schnittstelle WindowClosingStrategy
- Alle bekannten Implementierungsklassen:
InvariantWindowClosingStrategy
public interface WindowClosingStrategy
Definition of an interface used to control whether a window can be closed.
A
object can be passed an implementation of
this interface. Whenever the user wants to close the window (by clicking the
close button or using a similar mechanism) the Window
canClose()
method will be invoked to check if closing the window is allowed. If this
method returns false the close operation will be aborted.
A typical use case for this interface is displaying a confirmation message if there is unsaved data: Only if the user confirms that changed data can be thrown away, the window will be closed.
- Version:
- $Id: WindowClosingStrategy.java 205 2012-01-29 18:29:57Z oheger $
- Autor:
- Oliver Heger
-
Methodenübersicht
-
Methodendetails
-
canClose
Checks if the window can be closed. An implementation can perform any necessary operation to find out if closing the window at this moment is allowed. Only if true is returned, the window will be closed; otherwise it will remain open.- Parameter:
window
- a reference to the associated window- Gibt zurück:
- a flag whether the window can be closed
-