JAL-3690 separate startup and poll code in SeqAnnotationCalcWorker
[jalview.git] / src / jalview / gui / ProgressBar.java
index 011d810..abf096f 100644 (file)
@@ -166,6 +166,23 @@ public class ProgressBar implements IProgressIndicator
     });
 
   }
+  
+  @Override
+  public void removeProgressBar(final long id)
+  {
+    SwingUtilities.invokeLater(() -> {
+      JPanel progressPanel = progressBars.get(id);
+      if (progressPanel != null)
+      {
+        progressBars.remove(id);
+        if (progressBarHandlers.containsKey(id))
+        {
+          progressBarHandlers.remove(id);
+        }
+        removeRow(progressPanel);
+      }
+    });
+  }
 
   /**
    * Lays out progress bar container hierarchy