public class DisplayCoalescentEDTRunnablePool extends Object
| Modifier and Type | Method and Description |
|---|---|
static DisplayCoalescentEDTRunnablePool |
create() |
void |
invokeAsLateAsPossibleWithCoalescence(CoalescentRunnable runnable)
Like
invokeLaterWithCoalescence, but defers invocation until the
last scheduled task on the event queue is processed. |
void |
invokeLaterWithCoalescence(CoalescentRunnable runnable)
Invoke the given runnable on the EDT, coalescing multiple invocations on
the event queue.
|
public static DisplayCoalescentEDTRunnablePool create()
public void invokeLaterWithCoalescence(CoalescentRunnable runnable)
RepaintManager, without having to replace the system
global event queue via EventQueue.push.
The given runnable is scheduled to run on the EDT, just as with
SwingUtilities.invokeLater, but when invoked, all outstanding
runnables with the same "coalescence class"
(see CoalescentRunnable.getCoalescenceClass) will be coalesced and the
result will be run.runnable - the coalescent runnable to invoke on the EDTpublic void invokeAsLateAsPossibleWithCoalescence(CoalescentRunnable runnable)
invokeLaterWithCoalescence, but defers invocation until the
last scheduled task on the event queue is processed.
Note that if you keep calling this method at a higher rate than the EDT
is processing events, the runnable will not be executed until the EDT
becomes otherwise idle.runnable - the coalescent runnable to invoke on the EDTCopyright © 2023. All rights reserved.