X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fworkers%2FAlignCalcWorker.java;h=48e3604f03d53cce5d60d23989a9bda441ac9a6e;hb=1070450e1afee97a5b4567416f5b7655fbfa59f1;hp=566891f5801b8909db8f79fb643ba08e005a88f1;hpb=ad15cff29620f960119f80176f1fd443da9f6763;p=jalview.git diff --git a/src/jalview/workers/AlignCalcWorker.java b/src/jalview/workers/AlignCalcWorker.java index 566891f..48e3604 100644 --- a/src/jalview/workers/AlignCalcWorker.java +++ b/src/jalview/workers/AlignCalcWorker.java @@ -20,8 +20,6 @@ */ package jalview.workers; -import java.util.List; - import jalview.api.AlignCalcManagerI; import jalview.api.AlignCalcWorkerI; import jalview.api.AlignViewportI; @@ -29,6 +27,8 @@ import jalview.api.AlignmentViewPanel; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; +import java.util.List; + /** * Base class for alignment calculation workers * @@ -46,7 +46,7 @@ public abstract class AlignCalcWorker implements AlignCalcWorkerI protected AlignmentViewPanel ap; - protected List ourAnnots = null; + protected List ourAnnots; public AlignCalcWorker(AlignViewportI alignViewport, AlignmentViewPanel alignPanel) @@ -68,17 +68,18 @@ public abstract class AlignCalcWorker implements AlignCalcWorkerI } + @Override public boolean involves(AlignmentAnnotation i) { return ourAnnots != null && ourAnnots.contains(i); } /** - * permanently remove from the alignment all annotation rows managed by this + * Permanently removes from the alignment all annotation rows managed by this * worker */ @Override - public void removeOurAnnotation() + public void removeAnnotation() { if (ourAnnots != null && alignViewport != null) { @@ -90,6 +91,7 @@ public abstract class AlignCalcWorker implements AlignCalcWorkerI alignment.deleteAnnotation(aa, true); } } + ourAnnots.clear(); } } // TODO: allow GUI to query workers associated with annotation to add items to