Package org.cishell.framework.algorithm

Examples of org.cishell.framework.algorithm.ProgressMonitor


      TableItem item   = table.getItem(table.getSelectionIndex());
      if (item != null) {
        Algorithm algorithm = (Algorithm) tableItemToAlgorithmMap
            .get(item);
        if (algorithm instanceof ProgressTrackable) {
          ProgressMonitor monitor = ((ProgressTrackable) algorithm)
              .getProgressMonitor();
          if (monitor != null) {
            monitor.setPaused(false);
            setEnabledMenuItems(algorithm);
          }
        }
      }
    }
View Full Code Here


        Algorithm algorithm = (Algorithm) j.next();
        SchedulerTableItem schedulerTableItem = (SchedulerTableItem) algorithmToGuiItemMap
            .get(algorithm);
        if (tableItems[i].equals(schedulerTableItem.getTableItem())) {
          if (algorithmIsProgressTrackable(algorithm)) {
            ProgressMonitor monitor = ((ProgressTrackable) algorithm)
                .getProgressMonitor();
            monitor.setCanceled(true);
          }
          schedulerTableItem.remove();
          algorithmToGuiItemMap.remove(algorithm);
          break;
        }
View Full Code Here

     * @param algorithm The algorithm to interrogate
     * @return Whether or not the algorithm is trackable
     */
    private boolean algorithmIsProgressTrackable(Algorithm algorithm) {
    if (algorithm != null) {
      ProgressMonitor monitor = ((ProgressTrackable) algorithm)
          .getProgressMonitor();
      if (monitor != null) {
        return true;
      }
    }
View Full Code Here

    public void handleEvent(Event event) {
      TableItem item   = table.getItem(table.getSelectionIndex());
      if (item != null) {
        Algorithm algorithm = (Algorithm)tableItemToAlgorithmMap.get(item);
        if (algorithm instanceof ProgressTrackable) {
          ProgressMonitor monitor = ((ProgressTrackable)algorithm).getProgressMonitor();
          if (monitor != null) {
            monitor.setPaused(true);
            setEnabledMenuItems(algorithm);
          }
        }
      }
    }
View Full Code Here

      TableItem item   = table.getItem(table.getSelectionIndex());
      if (item != null) {
        Algorithm algorithm = (Algorithm) tableItemToAlgorithmMap
            .get(item);
        if (algorithm instanceof ProgressTrackable) {
          ProgressMonitor monitor = ((ProgressTrackable) algorithm)
              .getProgressMonitor();
          if (monitor != null) {
            monitor.setCanceled(true);
            setEnabledMenuItems(algorithm);
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.cishell.framework.algorithm.ProgressMonitor

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.