001/* A state change event for TabbedKeplerGraphFrames.
002 * 
003 * Copyright (c) 2010 The Regents of the University of California.
004 * All rights reserved.
005 *
006 * '$Author: crawl $'
007 * '$Date: 2015-02-09 17:59:57 +0000 (Mon, 09 Feb 2015) $' 
008 * '$Revision: 33222 $'
009 * 
010 * Permission is hereby granted, without written agreement and without
011 * license or royalty fees, to use, copy, modify, and distribute this
012 * software and its documentation for any purpose, provided that the above
013 * copyright notice and the following two paragraphs appear in all copies
014 * of this software.
015 *
016 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
017 * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
018 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
019 * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
020 * SUCH DAMAGE.
021 *
022 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
023 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
024 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
025 * PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
026 * CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
027 * ENHANCEMENTS, OR MODIFICATIONS.
028 *
029 */
030
031package org.kepler.gui.frame;
032
033import java.awt.Component;
034
035import org.kepler.gui.state.StateChangeEvent;
036
037import ptolemy.kernel.util.NamedObj;
038
039/** An event that represents a state change in TabbedKeplerGraphFrame.
040 * 
041 *   @author Daniel Crawl
042 *   @version $Id: TabbedKeplerGraphFrameEvent.java 33222 2015-02-09 17:59:57Z crawl $
043 */
044
045public class TabbedKeplerGraphFrameEvent extends StateChangeEvent {
046
047    /** Construct a new MultiCompositeStateChangeEvent event.
048     * @param source the source of the event
049     * @param frame the frame in which the state change occurs
050     * @param model the newly selected model
051     */
052    public TabbedKeplerGraphFrameEvent(Component source, 
053            TabbedKeplerGraphFrame frame, NamedObj model) {
054        super(source, CHANGE_TAB, model);
055        _frame = frame;
056    }
057    
058    /** Get the frame in which the state change occurs. */
059    public TabbedKeplerGraphFrame getFrame() {
060        return _frame;
061    }
062
063    /** Constant to denote the selected tab has been changed. */
064    public static final String CHANGE_TAB = "CHANGE_TAB";
065    
066    ///////////////////////////////////////////////////////////////////
067    ////                     private variables                     ////
068
069    /** The frame in which the state change occurs. */
070    private TabbedKeplerGraphFrame _frame;
071}