1 Clazz.declarePackage ("jssun.awt");
2 Clazz.load (null, "jssun.awt.PostEventQueue", ["jssun.awt.EventQueueItem", "$.SunToolkit", "swingjs.JSToolkit"], function () {
3 c$ = Clazz.decorateAsClass (function () {
6 this.eventQueue = null;
7 Clazz.instantialize (this, arguments);
8 }, jssun.awt, "PostEventQueue");
9 Clazz.makeConstructor (c$,
12 }, "java.awt.EventQueue");
13 Clazz.defineMethod (c$, "noEvents",
15 return this.queueHead == null;
17 Clazz.defineMethod (c$, "flush",
19 if (this.queueHead != null) {
22 tempQueue = this.queueHead;
23 this.queueHead = this.queueTail = null;
24 while (tempQueue != null) {
25 swingjs.JSToolkit.alert ("postevent IS NOT IMPLEMENTED " + tempQueue.event);
26 this.eventQueue.postEvent (tempQueue.event);
27 tempQueue = tempQueue.next;
30 Clazz.defineMethod (c$, "postEvent",
32 var item = new jssun.awt.EventQueueItem (event);
34 if (this.queueHead == null) {
35 this.queueHead = this.queueTail = item;
37 this.queueTail.next = item;
38 this.queueTail = item;
39 }}jssun.awt.SunToolkit.wakeupEventQueue (this.eventQueue, false);
40 }, "java.awt.AWTEvent");