public void notifyCancelled() { synchronized (syncObject) { monitor.notifyCancelled(); } }
public void notifyCancelled() { for (ProgressMonitor monitor : this.monitors) { monitor.notifyCancelled(); } }
monitor.notifyCancelled(); } else { monitor.notifyComplete();
/** * Updates the <code>ProgressMonitor</code> according to the new * status of the job. * @param newStatus The <code>JobStatus</code> indicating the new * status of the job. */ public synchronized void updateStatus(JobStatus newStatus) { assert(status == null || newStatus.getJobId().equals(status.getJobId())); if (newStatus.isProgressIndeterminant()) { monitor.notifyIndeterminantProgress(); } else if (status == null || newStatus.getProgress() != status.getProgress()) { monitor.notifyProgress(newStatus.getProgress()); } if (status == null || !newStatus.getStatus().equals(status.getStatus())) { monitor.notifyStatusChanged(newStatus.getStatus()); } if (newStatus.isComplete() && (status == null || !status.isComplete())) { monitor.notifyComplete(); } if (newStatus.isCancelled() && (status == null || !status.isCancelled())) { monitor.notifyCancelled(); } status = newStatus; }