Package qupath.lib.gui
Class TaskRunnerFX
java.lang.Object
qupath.lib.plugins.AbstractTaskRunner
qupath.lib.gui.TaskRunnerFX
- All Implemented Interfaces:
TaskRunner
Plugin runner that takes care of showing progress (in the appropriate thread) using JavaFX components.
- Author:
- Pete Bankhead
-
Constructor Summary
ConstructorDescriptionTaskRunnerFX
(QuPathGUI qupath) Constructor.TaskRunnerFX
(QuPathGUI qupath, int nThreads) Constructor specifying the number of threads. -
Method Summary
Modifier and TypeMethodDescriptionCreate a progress monitor to update the user on what is happening.protected void
postProcess
(Collection<? extends PathTask> tasks) Perform post-processing after a task has complete.void
runTasks
(Collection<? extends Runnable> tasks) Pass a collection of parallelizable tasks to run.Methods inherited from class qupath.lib.plugins.AbstractTaskRunner
awaitCompletion, isCancelled
-
Constructor Details
-
TaskRunnerFX
Constructor.- Parameters:
qupath
- the QuPath instance
-
TaskRunnerFX
Constructor specifying the number of threads.- Parameters:
qupath
- the QuPath instancenThreads
- the number of threads to use
-
-
Method Details
-
makeProgressMonitor
Description copied from class:AbstractTaskRunner
Create a progress monitor to update the user on what is happening.- Specified by:
makeProgressMonitor
in classAbstractTaskRunner
- Returns:
-
runTasks
Description copied from interface:TaskRunner
Pass a collection of parallelizable tasks to run.- Specified by:
runTasks
in interfaceTaskRunner
- Overrides:
runTasks
in classAbstractTaskRunner
- Parameters:
tasks
- the tasks to run. If these are instances ofPathTask
then an optional postprocessing may be applied after all tasks are complete.
-
postProcess
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 classAbstractTaskRunner
- Parameters:
tasks
-
-