JAL-974 - use refactored methods on AlignmentPanel
[jalview.git] / src / jalview / api / AlignCalcManagerI.java
index e9b625b..35374c5 100644 (file)
@@ -3,11 +3,12 @@ package jalview.api;
 import java.util.List;
 
 import jalview.datamodel.AlignmentAnnotation;
+import jalview.ws.jws2.AAConsClient;
 
 public interface AlignCalcManagerI
 {
 
-  
+
   /**
    * tell manager that a worker is initialised and has started to run
    * @param worker
@@ -41,7 +42,7 @@ public interface AlignCalcManagerI
   void workerCannotRun(AlignCalcWorkerI worker);
 
   /**
-   * indicate that a worker like this may be run on the platform.  
+   * indicate that a worker like this may be run on the platform.
    * @param worker of class to be removed from the execution blacklist
    */
   void workerMayRun(AlignCalcWorkerI worker);
@@ -52,7 +53,7 @@ public interface AlignCalcManagerI
   void startWorker(AlignCalcWorkerI worker);
 
   /**
-   * 
+   *
    * @param worker
    * @return
    */
@@ -64,7 +65,7 @@ public interface AlignCalcManagerI
    */
   boolean isWorking();
 
-  
+
   /**
    * register a restartable worker
    * @param worker
@@ -72,25 +73,25 @@ public interface AlignCalcManagerI
   void registerWorker(AlignCalcWorkerI worker);
 
   /**
-   * restart any registered workers 
+   * restart any registered workers
    */
   void restartWorkers();
 
   /**
-   * 
+   *
    * @param alignmentAnnotation
    * @return true if a currently registered and working worker indicates its involvement with the given alignmentAnnotation
    */
   boolean workingInvolvedWith(AlignmentAnnotation alignmentAnnotation);
 
   /**
-   * kick any known instances of the given worker class to update their annotation 
+   * kick any known instances of the given worker class to update their annotation
    * @param workerClass
    */
   void updateAnnotationFor(Class workerClass);
 
   /**
-   * return any registered workers of the given class 
+   * return any registered workers of the given class
    * @param workerClass
    * @return null or one or more workers of the given class
    */
@@ -105,4 +106,20 @@ public interface AlignCalcManagerI
    */
   boolean startRegisteredWorkersOfClass(Class workerClass);
 
+  /**
+   * work out if there is an instance of a worker that is *waiting* to start
+   * calculating
+   *
+   * @param workingClass
+   * @return true if workingClass is already waiting to calculate. false if it
+   *         is calculating, or not queued.
+   */
+  boolean isPending(AlignCalcWorkerI workingClass);
+
+  /**
+   * deregister and otherwise remove any registered and working instances of the given worker type
+   * @param typeToRemove
+   */
+  void removeRegisteredWorkersOfClass(Class typeToRemove);
+
 }