001    /*
002     Copyright (C) 2003 Adam Olsen
003     This program is free software; you can redistribute it and/or modify
004     it under the terms of the GNU General Public License as published by
005     the Free Software Foundation; either version 1, or (at your option)
006     any later version.
007     This program is distributed in the hope that it will be useful,
008     but WITHOUT ANY WARRANTY; without even the implied warranty of
009     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
010     GNU General Public License for more details.
011     You should have received a copy of the GNU General Public License
012     along with this program; if not, write to the Free Software
013     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
014     */
015    
016    package com.valhalla.jbother.plugins.events;
017    
018    import com.valhalla.pluginmanager.PluginEvent;
019    
020    /**
021     * Generated when someone clicks on the close button
022     * 
023     * @author Adam Olsen
024     */
025    public class ExitingEvent extends PluginEvent {
026        private boolean exit = true;
027    
028        public ExitingEvent(Object source) {
029            super(source);
030        }
031    
032        /**
033         * @return true if exit should still take place
034         */
035        public boolean getExit() {
036            return exit;
037        }
038    
039        /**
040         * @param exit
041         *            set to false if you want to cancel the exit operation
042         */
043        public void setExit(boolean exit) {
044            this.exit = exit;
045        }
046    }