Class TaskRunnerFX

All Implemented Interfaces:
TaskRunner

public class TaskRunnerFX extends AbstractTaskRunner
Plugin runner that takes care of showing progress (in the appropriate thread) using JavaFX components.
Author:
Pete Bankhead
  • Constructor Details

    • TaskRunnerFX

      public TaskRunnerFX(QuPathGUI qupath)
      Constructor.
      Parameters:
      qupath - the QuPath instance
    • TaskRunnerFX

      public TaskRunnerFX(QuPathGUI qupath, int nThreads)
      Constructor specifying the number of threads.
      Parameters:
      qupath - the QuPath instance
      nThreads - the number of threads to use
  • Method Details

    • makeProgressMonitor

      public SimpleProgressMonitor makeProgressMonitor()
      Description copied from class: AbstractTaskRunner
      Create a progress monitor to update the user on what is happening.
      Specified by:
      makeProgressMonitor in class AbstractTaskRunner
      Returns:
    • runTasks

      public void runTasks(Collection<? extends Runnable> tasks)
      Description copied from interface: TaskRunner
      Pass a collection of parallelizable tasks to run.
      Specified by:
      runTasks in interface TaskRunner
      Overrides:
      runTasks in class AbstractTaskRunner
      Parameters:
      tasks - the tasks to run. If these are instances of PathTask then an optional postprocessing may be applied after all tasks are complete.
    • postProcess

      protected void postProcess(Collection<? extends PathTask> tasks)
      Description copied from class: AbstractTaskRunner
      Perform post-processing after a task has complete. This is necessary to call the taskComplete method (if the Runnable is an instance of PathTask), and also to update any progress monitor. Note: Subclasses may choose to override this method so that it is called on a particular thread (e.g. with Platform.runLater() or SwingUtilities.invokeLater).
      Overrides:
      postProcess in class AbstractTaskRunner
      Parameters:
      tasks -