ceff684004e72f8e4db28398d065100a6f7868f0
[jalviewjs.git] / site / j2s / swingjs / JSAppletThread.js
1 Clazz.declarePackage ("swingjs");\r
2 Clazz.load (["swingjs.JSThread"], "swingjs.JSAppletThread", ["javax.swing.SwingUtilities"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.ap = null;\r
5 Clazz.instantialize (this, arguments);\r
6 }, swingjs, "JSAppletThread", swingjs.JSThread);\r
7 Clazz.makeConstructor (c$, \r
8 function (ap, group, name) {\r
9 Clazz.superConstructor (this, swingjs.JSAppletThread, [group, name]);\r
10 this.ap = ap;\r
11 }, "swingjs.JSAppletPanel,ThreadGroup,~S");\r
12 Clazz.overrideMethod (c$, "run1", \r
13 function (mode) {\r
14 mode = this.ap.run1 (mode);\r
15 if (mode != 2) this.dispatchAndReturn (null, mode);\r
16 }, "~N");\r
17 Clazz.defineMethod (c$, "dispatchAndReturn", \r
18 function (r, mode) {\r
19 var m = mode;\r
20 javax.swing.SwingUtilities.invokeLater (((Clazz.isClassDefined ("swingjs.JSAppletThread$1") ? 0 : swingjs.JSAppletThread.$JSAppletThread$1$ ()), Clazz.innerTypeInstance (swingjs.JSAppletThread$1, this, Clazz.cloneFinals ("m", m))));\r
21 }, "Runnable,~N");\r
22 c$.$JSAppletThread$1$ = function () {\r
23 Clazz.pu$h(self.c$);\r
24 c$ = Clazz.declareAnonymous (swingjs, "JSAppletThread$1", null, Runnable);\r
25 Clazz.overrideMethod (c$, "run", \r
26 function () {\r
27 this.b$["swingjs.JSAppletThread"].run1 (this.f$.m);\r
28 });\r
29 c$ = Clazz.p0p ();\r
30 };\r
31 });\r