X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Forg%2Fuwi%2FSimThread.js;fp=site%2Fj2s%2Forg%2Fuwi%2FSimThread.js;h=cab1f82e061aa3925c246d73d4171e2e1dca9dbf;hp=6834fd0bbd537e89c7cdc2f73864d086f3416125;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/org/uwi/SimThread.js b/site/j2s/org/uwi/SimThread.js index 6834fd0..cab1f82 100644 --- a/site/j2s/org/uwi/SimThread.js +++ b/site/j2s/org/uwi/SimThread.js @@ -1,45 +1,45 @@ -Clazz.declarePackage ("org.uwi"); -Clazz.load (["swingjs.JSThread"], "org.uwi.SimThread", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.boltzmann = null; -Clazz.instantialize (this, arguments); -}, org.uwi, "SimThread", swingjs.JSThread); -Clazz.makeConstructor (c$, -function (boltzmann) { -Clazz.superConstructor (this, org.uwi.SimThread, [null, "BoltzmannThread"]); -this.boltzmann = boltzmann; -}, "org.uwi.Boltzmann"); -Clazz.overrideMethod (c$, "run", -function () { -this.run1 (0); -}); -Clazz.overrideMethod (c$, "run1", -function (state) { -while (!Thread.interrupted ()) { -try { -switch (state) { -case 0: -this.boltzmann.sjs_initSimulation (); -state = 1; -continue; -case 1: -var repainted = this.boltzmann.sjs_checkRepaint (); -if (!this.boltzmann.sjs_loopSimulation ()) { -state = 2; -continue; -}if (repainted && this.sleepAndReturn (0, state)) return; -break; -case 2: -this.boltzmann.sjs_finalizeGraph (); -return; -} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -state = 2; -} else { -throw e; -} -} -} -}, "~N"); -}); +Clazz.declarePackage ("org.uwi"); +Clazz.load (["swingjs.JSThread"], "org.uwi.SimThread", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.boltzmann = null; +Clazz.instantialize (this, arguments); +}, org.uwi, "SimThread", swingjs.JSThread); +Clazz.makeConstructor (c$, +function (boltzmann) { +Clazz.superConstructor (this, org.uwi.SimThread, [null, "BoltzmannThread"]); +this.boltzmann = boltzmann; +}, "org.uwi.Boltzmann"); +Clazz.overrideMethod (c$, "run", +function () { +this.run1 (0); +}); +Clazz.overrideMethod (c$, "run1", +function (state) { +while (!Thread.interrupted ()) { +try { +switch (state) { +case 0: +this.boltzmann.sjs_initSimulation (); +state = 1; +continue; +case 1: +var repainted = this.boltzmann.sjs_checkRepaint (); +if (!this.boltzmann.sjs_loopSimulation ()) { +state = 2; +continue; +}if (repainted && this.sleepAndReturn (0, state)) return; +break; +case 2: +this.boltzmann.sjs_finalizeGraph (); +return; +} +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +state = 2; +} else { +throw e; +} +} +} +}, "~N"); +});