public class ScrollbarExecutor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
initial
true if it is the initial pass of the event-emitting loop. |
private java.util.concurrent.ExecutorService |
mouseInputExecutor
Executive single-thread pool.
|
private java.util.concurrent.Future |
mouseInputJob
Handle to the currently executed job.
|
Constructor and Description |
---|
ScrollbarExecutor() |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel the current job.
|
boolean |
delay()
Pause for
GuiConstants.INITIAL_REPEAT_MILLIS
on the first call after a job was submitted or
GuiConstants.REPEAT_MILLIS for subsequent
calls. |
boolean |
isJobRunning()
Checks if the executor has a running job.
|
void |
shutdown()
Shutdown the executor.
|
void |
submit(java.lang.Runnable r)
Submit the job that emits scroll events.
|
private final java.util.concurrent.ExecutorService mouseInputExecutor
private java.util.concurrent.Future mouseInputJob
private boolean initial
true
if it is the initial pass of the event-emitting loop.public void submit(java.lang.Runnable r)
r
- The job.public void cancel()
public boolean delay()
GuiConstants.INITIAL_REPEAT_MILLIS
on the first call after a job was submitted or
GuiConstants.REPEAT_MILLIS
for subsequent
calls.true
if pause finished. false
if pause was interrupted.public void shutdown()
public boolean isJobRunning()
true
if the executor has a running job.