001/**
002 *   Please feel free to use any fragment of the code in this file that you need
003 *   in your own work. As far as I am concerned, it's in the public domain. No
004 *   permission is necessary or required. Credit is always appreciated if you
005 *   use a large chunk or base a significant product on one of my examples,
006 *   but that's not required either.
007 *
008 *   This code is distributed in the hope that it will be useful,
009 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
010 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
011 *
012 *      --- Joseph A. Huwaldt
013 */
014package jahuwaldt.swing;
015
016/**
017 * An interface for objects that wish to receive notification that the application will
018 * soon be quitting.
019 *
020 * <p>
021 * Modified by: Joseph A. Huwaldt    </p>
022 *
023 * @author Joseph A. Huwaldt Date: May 22, 2004
024 * @version February 23, 2025
025 */
026public interface QuitListener {
027
028    /**
029     * This method is called by MDIApplication when the application is quitting. The
030     * listener should do something appropriate (if the listener is a window, the window
031     * should be closed, if the listener needs to ask the user something before quitting,
032     * it should do so at this time). To request that the quit be canceled, return true,
033     * else return false to continue with the quit.
034     *
035     * @return <code>true</code> if the quit event should be canceled or <code>
036     * false</code> to continue with the application quitting.
037     */
038    public boolean quit();
039
040}