KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwt > awt > EventQueue


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9
10    $Log: EventQueue.java,v $
11    Revision 1.1 2004/04/15 14:13:34 bobintetley
12    EventQueue implementation
13
14
15 */

16
17
18 package swingwt.awt;
19
20 import swingwtx.swing.*;
21
22 /**
23  * Dumb wrapper around other functions we have. Implements
24  * a bunch of statics that some code may rely on.
25  *
26  * The real "meat" of what this class is supposed to do
27  * is taken care of inside SwingWTUtils (and mapped over
28  * SWT dispatch mechanisms)
29  *
30  * @author Robin Rawson-Tetley
31  */

32 public class EventQueue {
33     
34     public EventQueue() {
35     }
36     
37     public static boolean isDispatchThread(Thread JavaDoc t) {
38         return t.equals(SwingWTUtils.getDisplay().getThread());
39     }
40     
41     public static AWTEvent getCurrentEvent() {
42         return null;
43     }
44     
45     public static long getMostRecentEventTime() {
46         return System.currentTimeMillis();
47     }
48     
49     public static void invokeAndWait(Runnable JavaDoc run) throws InterruptedException JavaDoc {
50         SwingUtilities.invokeAndWait(run);
51     }
52     
53     public static void invokeLater(Runnable JavaDoc run) {
54         SwingUtilities.invokeLater(run);
55     }
56     
57 }
58
Popular Tags