Class 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 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • 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​(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​(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