import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
-import jalview.gui.AlignFrame;
import jalview.gui.IProgressIndicator;
import jalview.ws2.WSJob;
import jalview.ws2.WSJobStatus;
var job = (WSJob) evt.getSource();
var oldStatus = (WSJobStatus) evt.getOldValue();
var newStatus = (WSJobStatus) evt.getNewValue();
- boolean wasRunning = oldStatus.isRunning() || oldStatus.isSubmitted();
- boolean isRunning = newStatus.isRunning() || newStatus.isSubmitted();
- if (!wasRunning && isRunning)
+ if (!oldStatus.isSubmitted() && newStatus.isSubmitted())
{
progressIndicator.setProgressBar(job.getServiceName(), job.getUid());
}
- else if (wasRunning && !isRunning)
+ if (newStatus.isDone() || newStatus.isCancelled())
{
progressIndicator.removeProgressBar(job.getUid());
}