Class ClassEventFilter
- java.lang.Object
-
- net.sf.jguiraffe.gui.builder.event.filter.AbstractEventFilter
-
- net.sf.jguiraffe.gui.builder.event.filter.ClassEventFilter
-
- All Implemented Interfaces:
EventFilter
public class ClassEventFilter extends AbstractEventFilter
A specialized
EventFilterimplementation 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 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description ClassEventFilter()Creates a new instance ofClassEventFilter.ClassEventFilter(Class<?> baseClass)Creates a new instance ofClassEventFilterand initializes it with the class to filter.ClassEventFilter(Class<?> baseClass, boolean acceptNull)Creates a new instance ofClassEventFilterand initializes it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanacceptEvent(BuilderEvent event)Tests the specified event object.-
Methods inherited from class net.sf.jguiraffe.gui.builder.event.filter.AbstractEventFilter
accept, getBaseClass, isAcceptNull, setAcceptNull, setBaseClass
-
-
-
-
Constructor Detail
-
ClassEventFilter
public ClassEventFilter()
Creates a new instance ofClassEventFilter. The class to filter is set toBuilderEvent, null values wont't be accepted.
-
ClassEventFilter
public ClassEventFilter(Class<?> baseClass)
Creates a new instance ofClassEventFilterand initializes it with the class to filter. null values wont't be accepted.- Parameters:
baseClass- the class to filter
-
ClassEventFilter
public ClassEventFilter(Class<?> baseClass, boolean acceptNull)
Creates a new instance ofClassEventFilterand initializes it.- Parameters:
baseClass- the class to filteracceptNull- theacceptNullflag
-
-
Method Detail
-
acceptEvent
protected boolean acceptEvent(BuilderEvent event)
Tests the specified event object.- Specified by:
acceptEventin classAbstractEventFilter- Parameters:
event- the event to test- Returns:
- a flag if this event is accepted
-
-