/*
 * @(#)MouseActionEvent.java    1.0.1  18 April 2001
 *
 * Copyright 2004
 * College of Computer and Information Science
 * Northeastern University
 * Boston, MA  02115
 *
 * The Java Power Tools software may be used for educational
 * purposes as long as this copyright notice is retained intact
 * at the top of all source files.
 *
 * To discuss possible commercial use of this software, 
 * contact Richard Rasala at Northeastern University, 
 * College of Computer and Information Science,
 * 617-373-2462 or rasala@ccs.neu.edu.
 *
 * The Java Power Tools software has been designed and built
 * in collaboration with Viera Proulx and Jeff Raab.
 *
 * Should this software be modified, the words "Modified from 
 * Original" must be included as a comment below this notice.
 *
 * All publication rights are retained.  This software or its 
 * documentation may not be published in any media either
 * in whole or in part without explicit permission.
 *
 * This software was created with support from Northeastern 
 * University and from NSF grant DUE-9950829.
 */

package edu.neu.ccs.gui;

import java.awt.event.*;

/**
* <P>Class of events representing an action 
* triggered by a mouse event.</P>
*
* @author  Jeff Raab
* @version 2.2
* @since   1.0.1
*/
public class MouseActionEvent extends ActionEvent {
   
    /** The mouse event that triggered this action event. */
    protected MouseEvent event = null;

    /**
     * Constructs a mouse action event 
     * triggered by the given mouse event 
     * generated by the given source object.
     *
     * @param evt the triggering mouse event
     * @param source the object that originated the event
     */
    public MouseActionEvent(MouseEvent evt, Object source) {
        this(evt, source, ActionEvent.ACTION_PERFORMED, null);
    }

    /**
     * Constructs a mouse action event 
     * triggered by the given mouse event 
     * generated by the given source object
     * with the given identifier and command name.
     *
     * @param evt the triggering mouse event
     * @param source the object that originated the event
     * @param an integer that identifies the event
     * @param command a string that may specify a command 
     *      (possibly one of several) associated with the event
     */
    public MouseActionEvent(
        MouseEvent evt, 
        Object source, 
        int id, 
        String command) 
    {
        super(source, id, command);
        event = evt;
    }

    /**
     * Returns the mouse event that triggered 
     * this mouse action event.
     */
    public MouseEvent getMouseEvent() {
        return event;
    }
}

