package mit.event ;

public class EventControlAdapter
extends mit.event.Adapter
{
	public EventControlAdapter( Object owner )
	{
		super( owner ) ;
	}
	protected java.util.Vector contained = null ;
	public boolean isContained( Class eventClass )
	{
		try
		{
			if( null != this.contained )
			{
				return( this.contained.contains( eventClass ) ) ;
			}
		}
		catch( Exception ex )
		{
			ex.printStackTrace() ;
		}
		return false ;
	}
	public void addContained( Class eventClass )
	{
		try
		{
			if( null == this.contained )
			{
				this.contained = new java.util.Vector() ;
			}
			if( ! isContained( eventClass ) )
			{
				this.contained.addElement( eventClass ) ;
			}
		}
		catch( Exception ex )
		{
			ex.printStackTrace() ;
		}
	}
	public void removeContained( Class eventClass )
	{
		try
		{
			if( isContained( eventClass ) )
			{
				this.contained.removeElement( eventClass ) ;
			}
		}
		catch( Exception ex )
		{
			ex.printStackTrace() ;
		}
	}

	protected java.util.Vector excluded = null ;
	public boolean isExcluded( Class eventClass )
	{
		try
		{
			if( null != this.excluded )
			{
				return( this.excluded.contains( eventClass ) ) ;
			}
		}
		catch( Exception ex )
		{
			ex.printStackTrace() ;
		}
		return false ;
	}
	public void addExcluded( Class eventClass )
	{
		try
		{
			if( null == this.excluded )
			{
				this.excluded = new java.util.Vector() ;
			}
			if( ! isExcluded( eventClass ) )
			{
				this.excluded.addElement( eventClass ) ;
			}
		}
		catch( Exception ex )
		{
			ex.printStackTrace() ;
		}
	}
	public void removeExcluded( Class eventClass )
	{
		try
		{
			if( isExcluded( eventClass ) )
			{
				this.excluded.removeElement( eventClass ) ;
			}
		}
		catch( Exception ex )
		{
			ex.printStackTrace() ;
		}
	}

}