Package net.sf.mzmine.taskcontrol

Examples of net.sf.mzmine.taskcontrol.TaskStatus


    // data
    // sets
    Task tasks[] = this.ticDataSets.values().toArray(new Task[0]);

    for (Task task : tasks) {
      TaskStatus status = task.getStatus();
      if ((status == TaskStatus.WAITING)
          || (status == TaskStatus.PROCESSING)) {
        task.cancel();
      }
View Full Code Here


      // First set to true, then check all tasks
      allTasksFinished = true;

      for (Task stepTask : currentStepTasks) {

        TaskStatus stepStatus = stepTask.getStatus();

        // If any of them is not finished, keep checking
        if (stepStatus != TaskStatus.FINISHED)
          allTasksFinished = false;
View Full Code Here

  }

  synchronized int getNumOfWaitingTasks() {
    int numOfWaitingTasks = 0;
    for (int i = 0; i < size; i++) {
      TaskStatus status = queue[i].getActualTask().getStatus();
      if ((status == TaskStatus.PROCESSING)
          || (status == TaskStatus.WAITING))
        numOfWaitingTasks++;
    }
    return numOfWaitingTasks;
View Full Code Here

    return size == 0;
  }

  synchronized boolean allTasksFinished() {
    for (int i = 0; i < size; i++) {
      TaskStatus status = queue[i].getActualTask().getStatus();
      if ((status == TaskStatus.PROCESSING)
          || (status == TaskStatus.WAITING))
        return false;
    }
    return true;
View Full Code Here

    Object src = event.getSource();

    if (src == cancelTaskMenuItem) {
      if (selectedTask == null)
        return;
      TaskStatus status = selectedTask.getStatus();
      if ((status == TaskStatus.WAITING)
          || (status == TaskStatus.PROCESSING)) {
        selectedTask.cancel();
      }
    }

    if (src == cancelAllMenuItem) {
      for (WrappedTask wrappedTask : currentQueue) {
        Task task = wrappedTask.getActualTask();
        TaskStatus status = task.getStatus();
        if ((status == TaskStatus.WAITING)
            || (status == TaskStatus.PROCESSING)) {
          task.cancel();
        }
      }
View Full Code Here

  }

  public void dispose() {

    // Cancel the search task if it is still running
    TaskStatus searchStatus = searchTask.getStatus();
    if ((searchStatus == TaskStatus.WAITING)
        || (searchStatus == TaskStatus.PROCESSING))
      searchTask.cancel();

    super.dispose();
View Full Code Here

  }

  public void dispose() {

    // Cancel the search task if it is still running
    TaskStatus searchStatus = searchTask.getStatus();
    if ((searchStatus == TaskStatus.WAITING)
        || (searchStatus == TaskStatus.PROCESSING))
      searchTask.cancel();

    super.dispose();
View Full Code Here

TOP

Related Classes of net.sf.mzmine.taskcontrol.TaskStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.