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