public class AwtUtils extends Object
| Constructor and Description |
|---|
AwtUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
doLaterOnEventThread(Runnable task)
Schedule a task for later execution on the event dispatch thread and return immediately.
|
static void |
doLaterOnEventThread(String key,
int delay,
Runnable task)
Schedule a task for later execution on the event dispatch thread and return immediately.
|
static void |
doOnEventThread(Runnable task)
Execute a task on the even dispatch thread.
|
static void |
doOnEventThreadAndWait(Runnable task)
Execute a task on the even dispatch thread and wait for it to finish.
|
static <T> T |
resultOfOnEventThread(Callable<T> task)
Execute a task on the event dispatch thread and return the result.
|
public static <T> T resultOfOnEventThread(Callable<T> task)
T - The type of the result to return.task - The task to execute.public static void doOnEventThread(Runnable task)
task - The task to execute.public static void doOnEventThreadAndWait(Runnable task)
task - The task to execute.public static void doLaterOnEventThread(Runnable task)
task - The task to execute.public static void doLaterOnEventThread(String key, int delay, Runnable task)
If a task with the same key is already scheduled and has not yet executed that will be superseded.
key - The unique key of the task. Scheduling a task will supersede a task with the same key that is already
scheduled.delay - The minimum number of milliseconds after which the task should be executed.task - The task to execute.Copyright © 2011–2025 pepsoft.org. All rights reserved.