Class 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 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.
    • Constructor Detail

      • InvariantWindowClosingStrategy

        public InvariantWindowClosingStrategy()
    • Method Detail

      • canClose

        public boolean canClose​(Window window)
        Checks if the window can be closed. This implementation returns always true.
        Specified by:
        canClose in interface WindowClosingStrategy
        Parameters:
        window - the affected window
        Returns:
        a flag if the window can be closed