public class DelayedSwingRunnable
extends java.lang.Object
| Constructor and Description |
|---|
DelayedSwingRunnable(int delay,
java.lang.Runnable runnable)
Create an instance to run and optionally delay running
of a Runnable.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
run()
Will attempt to run the Runnable if it has not run yet.
|
boolean |
stop()
Will attempt to prevent running of the Runnable if it has
not run yet.
|
public DelayedSwingRunnable(int delay,
java.lang.Runnable runnable)
delay - The delay in milliseconds before the runnable
is run. If the delay is <= 0, the runnable is run
immediately.runnable - The code to be runpublic boolean stop()
public boolean run()