Class InvariantWindowClosingStrategy
- java.lang.Object
-
- net.sf.jguiraffe.gui.builder.window.InvariantWindowClosingStrategy
-
- All Implemented Interfaces:
WindowClosingStrategy
public class InvariantWindowClosingStrategy extends Object implements WindowClosingStrategy
A very simple implementation of the
WindowClosingStrategy
interface.The
canClose(Window)
method of this implementation returns always true. So an instance of this class can be used as a default window closing strategy that is used when no specific strategy was specified.- Version:
- $Id: InvariantWindowClosingStrategy.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Field Summary
Fields Modifier and Type Field Description static InvariantWindowClosingStrategy
DEFAULT_INSTANCE
Stores the default instance of this class.
-
Constructor Summary
Constructors Constructor Description InvariantWindowClosingStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canClose(Window window)
Checks if the window can be closed.
-
-
-
Field Detail
-
DEFAULT_INSTANCE
public static final InvariantWindowClosingStrategy DEFAULT_INSTANCE
Stores the default instance of this class. Because this implementation is thread safe, it can be shared.
-
-
Method Detail
-
canClose
public boolean canClose(Window window)
Checks if the window can be closed. This implementation returns always true.- Specified by:
canClose
in interfaceWindowClosingStrategy
- Parameters:
window
- the affected window- Returns:
- a flag if the window can be closed
-
-