KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > foxtrot > pumps > EventFilter


1 /**
2  * Copyright (c) 2002-2005, Simone Bordet
3  * All rights reserved.
4  *
5  * This software is distributable under the BSD license.
6  * See the terms of the BSD license in the documentation provided with this software.
7  */

8
9 package foxtrot.pumps;
10
11 import java.awt.AWTEvent JavaDoc;
12
13 /**
14  * Filters AWT events pumped by {@link foxtrot.EventPump EventPump}s before they're dispatched.
15  * @see EventFilterable
16  * @version $Revision: 1.4 $
17  */

18 public interface EventFilter
19 {
20    /**
21     * Callback called by {@link foxtrot.EventPump EventPump}s to filter the given AWT event.
22     * Implementations should return true if the event should be dispatched, false otherwise.
23     * Beware that installing an EventFilter in one of the synchronous Foxtrot workers, and
24     * returning always false from {@link #accept(AWTEvent)} makes the posts to the worker
25     * hang.
26     * @param event The event to filter
27     */

28    public boolean accept(AWTEvent JavaDoc event);
29 }
30
Popular Tags