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
ConstructorsConstructorDescriptionTaskRunnerFX(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 voidpostProcess(Collection<? extends PathTask> tasks) Perform post-processing after a task has complete.voidrunTasks(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:AbstractTaskRunnerCreate a progress monitor to update the user on what is happening.- Specified by:
makeProgressMonitorin classAbstractTaskRunner- Returns:
-
runTasks
Description copied from interface:TaskRunnerPass a collection of parallelizable tasks to run.- Specified by:
runTasksin interfaceTaskRunner- Overrides:
runTasksin classAbstractTaskRunner- Parameters:
tasks- the tasks to run. If these are instances ofPathTaskthen an optional postprocessing may be applied after all tasks are complete.
-
postProcess
Description copied from class:AbstractTaskRunnerPerform 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:
postProcessin classAbstractTaskRunner
-