net.sf.jguiraffe.gui.builder.event.filter
Class ClassEventFilter

java.lang.Object
  extended by net.sf.jguiraffe.gui.builder.event.filter.AbstractEventFilter
      extended by net.sf.jguiraffe.gui.builder.event.filter.ClassEventFilter
All Implemented Interfaces:
EventFilter

public class ClassEventFilter
extends AbstractEventFilter

A specialized EventFilter implementation that filters by an event class.

This event filter class can be used if only certain event classes are to be selected and the concrete event type does not matter. For instance, this class allows you to select all types of WindowEvents.

Version:
$Id: ClassEventFilter.java 154 2009-02-09 21:07:07Z oheger $
Author:
Oliver Heger

Constructor Summary
ClassEventFilter()
          Creates a new instance of ClassEventFilter.
ClassEventFilter(java.lang.Class<?> baseClass)
          Creates a new instance of ClassEventFilter and initializes it with the class to filter.
ClassEventFilter(java.lang.Class<?> baseClass, boolean acceptNull)
          Creates a new instance of ClassEventFilter and initializes it.
 
Method Summary
protected  boolean acceptEvent(BuilderEvent event)
          Tests the specified event object.
 
Methods inherited from class net.sf.jguiraffe.gui.builder.event.filter.AbstractEventFilter
accept, getBaseClass, isAcceptNull, setAcceptNull, setBaseClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassEventFilter

public ClassEventFilter()
Creates a new instance of ClassEventFilter. The class to filter is set to BuilderEvent, null values wont't be accepted.


ClassEventFilter

public ClassEventFilter(java.lang.Class<?> baseClass)
Creates a new instance of ClassEventFilter and initializes it with the class to filter. null values wont't be accepted.

Parameters:
baseClass - the class to filter

ClassEventFilter

public ClassEventFilter(java.lang.Class<?> baseClass,
                        boolean acceptNull)
Creates a new instance of ClassEventFilter and initializes it.

Parameters:
baseClass - the class to filter
acceptNull - the acceptNull flag
Method Detail

acceptEvent

protected boolean acceptEvent(BuilderEvent event)
Tests the specified event object.

Specified by:
acceptEvent in class AbstractEventFilter
Parameters:
event - the event to test
Returns:
a flag if this event is accepted


Copyright © 2009 The JGUIraffe Team. All Rights Reserved.