1 Clazz.declarePackage ("java.awt.event");
\r
2 Clazz.load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.event.InvocationEvent", ["java.lang.Exception"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
4 this.runnable = null;
\r
5 this.notifier = null;
\r
6 this.catchExceptions = false;
\r
7 this.exception = null;
\r
8 this.throwable = null;
\r
10 Clazz.instantialize (this, arguments);
\r
11 }, java.awt.event, "InvocationEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
\r
12 Clazz.makeConstructor (c$,
\r
13 function (source, runnable) {
\r
14 this.construct (source, runnable, null, false);
\r
16 Clazz.makeConstructor (c$,
\r
17 function (source, runnable, notifier, catchThrowables) {
\r
18 this.construct (source, 1200, runnable, notifier, catchThrowables);
\r
19 }, "~O,Runnable,~O,~B");
\r
20 Clazz.makeConstructor (c$,
\r
21 function (source, id, runnable, notifier, catchThrowables) {
\r
22 Clazz.superConstructor (this, java.awt.event.InvocationEvent, [source, id]);
\r
23 this.runnable = runnable;
\r
24 this.notifier = notifier;
\r
25 this.catchExceptions = catchThrowables;
\r
26 this.when = System.currentTimeMillis ();
\r
27 }, "~O,~N,Runnable,~O,~B");
\r
28 Clazz.overrideMethod (c$, "dispatch",
\r
30 if (this.catchExceptions) {
\r
32 this.runnable.run ();
\r
34 if (Clazz.instanceOf (t, Exception)) {
\r
36 }this.throwable = t;
\r
39 this.runnable.run ();
\r
40 }if (this.notifier != null) {
\r
42 this.notifier.notifyAll ();
\r
44 Clazz.defineMethod (c$, "getException",
\r
46 return (this.catchExceptions) ? this.exception : null;
\r
48 Clazz.defineMethod (c$, "getThrowable",
\r
50 return (this.catchExceptions) ? this.throwable : null;
\r
52 Clazz.defineMethod (c$, "getWhen",
\r
56 Clazz.overrideMethod (c$, "paramString",
\r
61 typeStr = "INVOCATION_DEFAULT";
\r
64 typeStr = "unknown type";
\r
66 return typeStr + ",runnable=" + this.runnable + ",notifier=" + this.notifier + ",catchExceptions=" + this.catchExceptions + ",when=" + this.when;
\r
68 Clazz.defineStatics (c$,
\r
69 "SWINGJS_INVOCATION_LOW", 1201,
\r
70 "INVOCATION_FIRST", 1200,
\r
71 "INVOCATION_DEFAULT", 1200,
\r
72 "INVOCATION_LAST", 1201);
\r