KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > awt > EventFilter


1 /*
2  * @(#)EventFilter.java 1.4 05/11/17
3  *
4  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package java.awt;
8
9 interface EventFilter {
10
11     /**
12      * Enumeration for possible values for <code>acceptEvent(AWTEvent ev)</code> method.
13      * @see EventDispatchThread#pumpEventsForFilters(EventFilter)
14      */

15     static enum FilterAction {
16         /**
17          * ACCEPT means that this filter do not filter the event and allowes other
18          * active filters to proceed it. If all the active filters accept the event, it
19          * is dispatched by the <code>EventDispatchThread</code>
20          * @see EventDispatchThread#pumpEventsForFilters(EventFilter)
21          */

22         ACCEPT,
23         /**
24          * REJECT means that this filter filter the event. No other filters are queried,
25          * and the event is not dispatched by the <code>EventDispatchedThread</code>
26          * @see EventDispatchThread#pumpEventsForFilters(EventFilter)
27          */

28         REJECT,
29         /**
30          * ACCEPT_IMMEDIATELY means that this filter do not filter the event, no other
31          * filters are queried and to proceed it, and it is dispatched by the
32          * <code>EventDispatchThread</code>
33          * It is not recommended to use ACCEPT_IMMEDIATELY as there may be some active
34          * filters not queried yet that do not accept this event. It is primarily used
35          * by modal filters.
36          * @see EventDispatchThread#pumpEventsForFilters(EventFilter)
37          * @see ModalEventFilter
38          */

39         ACCEPT_IMMEDIATELY
40     };
41
42     FilterAction acceptEvent(AWTEvent JavaDoc ev);
43 }
44
Popular Tags