1 Clazz.declarePackage ("jalview.workers");
2 Clazz.load (["jalview.api.AlignCalcWorkerI", "swingjs.JSThread"], "jalview.workers.AlignCalcWorker", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
10 this.alignViewport = null;
13 this.ourAnnots = null;
14 Clazz.instantialize (this, arguments);
15 }, jalview.workers, "AlignCalcWorker", swingjs.JSThread, jalview.api.AlignCalcWorkerI);
16 Clazz.makeConstructor (c$,
17 function (alignViewport, alignPanel) {
18 Clazz.superConstructor (this, jalview.workers.AlignCalcWorker, [null, "AlignCalcWorker"]);
19 this.alignViewport = alignViewport;
20 this.calcMan = alignViewport.getCalcManager ();
22 }, "jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel");
23 Clazz.defineMethod (c$, "abortAndDestroy",
25 if (this.calcMan != null) {
26 this.calcMan.workerComplete (this);
27 }this.alignViewport = null;
31 Clazz.overrideMethod (c$, "involves",
33 return this.ourAnnots != null && this.ourAnnots.contains (i);
34 }, "jalview.datamodel.AlignmentAnnotation");
35 Clazz.overrideMethod (c$, "removeOurAnnotation",
37 if (this.ourAnnots != null && this.alignViewport != null) {
38 var alignment = this.alignViewport.getAlignment ();
40 for (var aa, $aa = this.ourAnnots.iterator (); $aa.hasNext () && ((aa = $aa.next ()) || true);) {
41 alignment.deleteAnnotation (aa, true);
44 Clazz.defineMethod (c$, "notifyDone",
46 if (this.ap != null) {
47 this.ap.paintAlignment (true);
48 }this.calcMan.workerComplete (this);
50 Clazz.defineStatics (c$,