package gui;

import java.awt.*;

/**
 * An EventObject that can be used to inform listeners of a 
 * Color change
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class ColorEvent extends java.util.EventObject
{
    private Color       color;
    private String      id;    
    
    /**
     * Explicit Value Constructor
     *
     * @param source   The source of the event
     * @param color    The Color of interest
     * @param id       The identifier for this ColorEvent
     */
    public ColorEvent(Object source, Color color, String id)
    {
       super(source);
       this.color = color;
       this.id    = id;
    }

    /**
     * Get the Color associated with this ColorEvent
     *
     * @return   The Color
     */
    public Color getColor()
    {
       return color;
    }

    /**
     * Get the ID associated with this ColorEvent
     *
     * @return   The ID
     */
    public String getID()
    {
       return id;
    }
    
}

