Package ghidra.util.task
Class InvokeInSwingTask
- java.lang.Object
-
- ghidra.util.task.Task
-
- ghidra.util.task.InvokeInSwingTask
-
- All Implemented Interfaces:
MonitoredRunnable
public class InvokeInSwingTask extends Task
A task that will simply invoke the given runnable later in the Swing thread. This class is useful for executing long running tasks in the swing thread while using theTaskLauncherto show a modal dialog.
-
-
Field Summary
-
Fields inherited from class ghidra.util.task.Task
waitForTaskCompleted
-
-
Constructor Summary
Constructors Constructor Description InvokeInSwingTask(java.lang.String title, java.lang.Runnable runnable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun(TaskMonitor monitor)This is the method that will be called to do the work-
Methods inherited from class ghidra.util.task.Task
addTaskListener, canCancel, cancel, getStatusTextAlignment, getTaskTitle, hasProgress, isForgettable, isInterruptible, isModal, monitoredRun, notifyTaskListeners, setForgettable, setHasProgress, setInterruptible
-
-
-
-
Method Detail
-
run
public void run(TaskMonitor monitor)
Description copied from class:TaskThis is the method that will be called to do the workNote: The run(TaskMonitor) method should not make any calls directly on Swing components, as these calls are not thread safe. Place Swing calls in a Runnable, then call
SystemUtilities.runSwingLater(Runnable)orSystemUtilities.runSwingNow(Runnable)to schedule the Runnable inside of the AWT Event Thread.
-
-