X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fworkers%2FAlignCalcWorker.java;h=48e3604f03d53cce5d60d23989a9bda441ac9a6e;hb=65d6d09cd08743d481d39521bb0298ea683888f8;hp=7497e7a55986284a4a1d5364849524ccb6d9df32;hpb=865a855a4ca87eadb3e5ff284ed32ed307d9c34b;p=jalview.git
diff --git a/src/jalview/workers/AlignCalcWorker.java b/src/jalview/workers/AlignCalcWorker.java
index 7497e7a..48e3604 100644
--- a/src/jalview/workers/AlignCalcWorker.java
+++ b/src/jalview/workers/AlignCalcWorker.java
@@ -1,25 +1,25 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
*
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with Jalview. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
* The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.workers;
-import java.util.List;
-
import jalview.api.AlignCalcManagerI;
import jalview.api.AlignCalcWorkerI;
import jalview.api.AlignViewportI;
@@ -27,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
*
@@ -44,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)
@@ -66,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)
{
@@ -88,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