public class IstiSwingEventQueue
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static IstiSwingEventQueue |
getInstance()
Get the Swing event queue.
|
static int |
getPeriod()
Get the period.
|
static boolean |
invokeLater(java.util.concurrent.atomic.AtomicLong atomicLong,
long time,
java.lang.Runnable runnable)
Causes doRun.run() to be executed asynchronously on the AWT event
dispatching thread at or slightly after the specified time.
|
static void |
invokeLater(java.lang.Number time,
java.lang.Runnable runnable)
Causes doRun.run() to be executed asynchronously on the AWT event
dispatching thread at or slightly after the specified time.
|
static boolean |
setPeriod(int ms)
Set the period for checking the events.
|
public static IstiSwingEventQueue getInstance()
public static int getPeriod()
public static boolean invokeLater(java.util.concurrent.atomic.AtomicLong atomicLong, long time, java.lang.Runnable runnable)
The Runnable
will only be called if the
atomicLong
value is set to 0 which happens after it is run in
order to allow the caller to know if it has already been run or not.
atomicLong
- the time to check before running,time
- time at which the Runnable
is to be
executed.runnable
- the Runnable
whose run
to be
executed.true
- if the Runnable
will be executed, false
otherwise.public static void invokeLater(java.lang.Number time, java.lang.Runnable runnable)
If the time is an AtomicLong
then the time value is set to 0
after it is run in order to allow the caller to know if it has already been
run or not.
time
- time at which the Runnable
is to be executed.runnable
- the Runnable
whose run
to be
executed.public static boolean setPeriod(int ms)
ms
- the time in milliseconds between successive task executions, must
be greater than 0.