4 package jalview.workers;
8 import jalview.api.AlignCalcManagerI;
9 import jalview.api.AlignCalcWorkerI;
10 import jalview.api.AlignViewportI;
11 import jalview.api.AlignmentViewPanel;
12 import jalview.datamodel.AlignmentAnnotation;
15 * Base class for alignment calculation workers
19 public abstract class AlignCalcWorker implements AlignCalcWorkerI
22 * manager and data source for calculations
24 protected AlignViewportI alignViewport;
25 protected AlignCalcManagerI calcMan;
26 protected AlignmentViewPanel ap;
27 protected List<AlignmentAnnotation> ourAnnots=null;
29 public AlignCalcWorker(AlignViewportI alignViewport,
30 AlignmentViewPanel alignPanel)
32 this.alignViewport = alignViewport;
33 calcMan=alignViewport.getCalcManager();
36 protected void abortAndDestroy()
39 calcMan.workerComplete(this);
46 public boolean involves(AlignmentAnnotation i)
48 return ourAnnots!=null && ourAnnots.contains(i);
51 // TODO: allow GUI to query workers associated with annotation to add items to annotation label panel popup menu