/*
 * Created on 2004-6-8
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.huihoo.willow;

/**
 * @author reic
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
import java.util.EventObject;

/**
 * General event for notifying listeners of significant changes on a Container.
 *
 * @author Craig R. McClanahan
 * @version $Revision: 1.1.1.1 $ $Date: 2002/07/18 16:47:36 $
 */

public final class ContainerEvent extends EventObject
{

	/**
	 * The Container on which this event occurred.
	 */
	private Container container = null;

	/**
	 * The event data associated with this event.
	 */
	private Object data = null;

	/**
	 * The event type this instance represents.
	 */
	private String type = null;

	/**
	 * Construct a new ContainerEvent with the specified parameters.
	 *
	 * @param container Container on which this event occurred
	 * @param type Event type
	 * @param data Event data
	 */
	public ContainerEvent(Container container, String type, Object data)
	{

		super(container);
		this.container = container;
		this.type = type;
		this.data = data;

	}

	/**
	 * Return the event data of this event.
	 */
	public Object getData()
	{

		return (this.data);

	}

	/**
	 * Return the Container on which this event occurred.
	 */
	public Container getContainer()
	{

		return (this.container);

	}

	/**
	 * Return the event type of this event.
	 */
	public String getType()
	{

		return (this.type);

	}

	/**
	 * Return a string representation of this event.
	 */
	public String toString()
	{

		return ("ContainerEvent['" + getContainer() + "','" + getType() + "','" + getData() + "']");

	}

}