1 Clazz.declarePackage ("java.awt");
2 Clazz.load (["java.awt.AWTEvent", "$.ActiveEvent", "java.util.LinkedList"], "java.awt.SequencedEvent", ["java.lang.Thread", "java.awt.Component", "$.Conditional", "$.EventQueue", "$.SentEvent", "$.Toolkit", "jssun.awt.AppContext", "$.SunToolkit", "swingjs.JSToolkit"], function () {
3 c$ = Clazz.decorateAsClass (function () {
5 this.appContext = null;
7 Clazz.instantialize (this, arguments);
8 }, java.awt, "SequencedEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
9 Clazz.makeConstructor (c$,
11 Clazz.superConstructor (this, java.awt.SequencedEvent, [nested.getSource (), 1006]);
14 java.awt.SequencedEvent.list.add (this);
15 }}, "java.awt.AWTEvent");
16 Clazz.overrideMethod (c$, "dispatch",
19 this.appContext = jssun.awt.AppContext.getAppContext ();
20 if (java.awt.SequencedEvent.getFirst () !== this) {
21 if (java.awt.EventQueue.isDispatchThread ()) {
22 var edt = Thread.currentThread ();
23 edt.pumpEvents (1007, ((Clazz.isClassDefined ("java.awt.SequencedEvent$1") ? 0 : java.awt.SequencedEvent.$SequencedEvent$1$ ()), Clazz.innerTypeInstance (java.awt.SequencedEvent$1, this, null)));
25 while (!this.isFirstOrDisposed ()) {
28 swingjs.JSToolkit.warn ("Cannot wait in SequenceEvent");
29 java.awt.SequencedEvent.wait (1000);
31 if (Clazz.exceptionOf (e, InterruptedException)) {
38 }}if (!this.disposed) {
39 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
44 c$.isOwnerAppContextDisposed = Clazz.defineMethod (c$, "isOwnerAppContextDisposed",
47 var target = se.nested.getSource ();
48 if (Clazz.instanceOf (target, java.awt.Component)) {
49 return (target).appContext.isDisposed ();
51 }, "java.awt.SequencedEvent");
52 Clazz.defineMethod (c$, "isFirstOrDisposed",
56 }return this === java.awt.SequencedEvent.getFirstWithContext () || this.disposed;
58 c$.getFirst = Clazz.defineMethod (c$, "getFirst",
60 return java.awt.SequencedEvent.list.getFirst ();
62 c$.getFirstWithContext = Clazz.defineMethod (c$, "getFirstWithContext",
64 var first = java.awt.SequencedEvent.getFirst ();
65 while (java.awt.SequencedEvent.isOwnerAppContextDisposed (first)) {
67 first = java.awt.SequencedEvent.getFirst ();
71 Clazz.defineMethod (c$, "dispose",
76 }this.disposed = true;
77 }if (this.appContext != null) {
78 jssun.awt.SunToolkit.postEvent (this.appContext, new java.awt.SentEvent ());
81 java.awt.SequencedEvent.notifyAll ();
82 if (java.awt.SequencedEvent.list.getFirst () === this) {
83 java.awt.SequencedEvent.list.removeFirst ();
84 if (!java.awt.SequencedEvent.list.isEmpty ()) {
85 next = java.awt.SequencedEvent.list.getFirst ();
87 java.awt.SequencedEvent.list.remove (this);
88 }}if (next != null && next.appContext != null) {
89 jssun.awt.SunToolkit.postEvent (next.appContext, new java.awt.SentEvent ());
91 c$.$SequencedEvent$1$ = function () {
93 c$ = Clazz.declareAnonymous (java.awt, "SequencedEvent$1", null, java.awt.Conditional);
94 Clazz.overrideMethod (c$, "evaluate",
96 return !this.b$["java.awt.SequencedEvent"].isFirstOrDisposed ();
100 Clazz.defineStatics (c$,
102 c$.list = c$.prototype.list = new java.util.LinkedList ();