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.
-
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(String message, Collection<? extends Runnable> tasks) Pass a collection of parallelizable tasks to run.Methods inherited from class qupath.lib.plugins.AbstractTaskRunner
awaitCompletion, isCancelledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface qupath.lib.plugins.TaskRunner
runTasks
-
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:
message- optional message to display to the user when running tasks; may be nulltasks- 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- Parameters:
tasks-
-