Package ghidra.util.task
Class BufferedSwingRunner
java.lang.Object
ghidra.util.task.AbstractSwingUpdateManager
ghidra.util.task.BufferedSwingRunner
A class that run the client's runnable on the Swing thread. Repeated requests will get buffered
until the max delay is reached.
-
Field Summary
Fields inherited from class ghidra.util.task.AbstractSwingUpdateManager
DEFAULT_MAX_DELAY, DEFAULT_MIN_DELAY, DEFAULT_NAME, isWorking, MIN_DELAY_FLOOR, NONE, timer -
Constructor Summary
ConstructorsConstructorDescriptionBufferedSwingRunner(int minDelay, int maxDelay) Constructs a new SwingUpdateManager -
Method Summary
Modifier and TypeMethodDescriptionvoidRuns the given runnable.voidRuns the given runnable later, buffering the request until the timeout has expired.protected voidThe subclass callback to perform work.Methods inherited from class ghidra.util.task.AbstractSwingUpdateManager
checkForWork, dispose, flush, hasPendingUpdates, isBusy, isDisposed, scheduleCheckForWork, stop, toString, toStringDebug, update, updateLater, updateNow
-
Constructor Details
-
BufferedSwingRunner
public BufferedSwingRunner(int minDelay, int maxDelay) Constructs a new SwingUpdateManagerNote: The
minDelaywill always be at leastAbstractSwingUpdateManager.MIN_DELAY_FLOOR, regardless of the given value.- Parameters:
minDelay- the minimum number of milliseconds to wait once the event stream stops coming in before actually updating the screen.maxDelay- the maximum amount of time to wait between gui updates.
-
BufferedSwingRunner
public BufferedSwingRunner()
-
-
Method Details
-
swingDoWork
protected void swingDoWork()Description copied from class:AbstractSwingUpdateManagerThe subclass callback to perform work.- Specified by:
swingDoWorkin classAbstractSwingUpdateManager
-
run
Runs the given runnable. If this is the first call torun, then do the work immediately; otherwise, buffer the request until the timeout has expired.See the header of
AbstractSwingUpdateManagerfor details on the update process.- Parameters:
r- the task to run on the Swing thread
-
runLater
Runs the given runnable later, buffering the request until the timeout has expired.See the header of
AbstractSwingUpdateManagerfor details on the update process.- Parameters:
r- the task to run on the Swing thread
-