@ThreadSafe public class GuiActionRunner extends Object
Constructor and Description |
---|
GuiActionRunner() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
execute(Callable<T> query)
Executes the given callable in the event dispatch thread (EDT).
|
static void |
execute(GuiActionRunnable task)
Executes the given runnable in the event dispatch thread (EDT).
|
static <T> T |
execute(GuiQuery<T> query)
Executes the given query in the event dispatch thread (EDT).
|
static void |
execute(GuiTask task)
Executes the given task in the event dispatch thread (EDT).
|
static boolean |
executeInEDT()
|
static void |
executeInEDT(boolean b)
Indicates
GuiActionRunner whether instances of GuiQuery and GuiTask should be executed in
the event dispatch thread (EDT). |
public static void executeInEDT(boolean b)
GuiActionRunner
whether instances of GuiQuery
and GuiTask
should be executed in
the event dispatch thread (EDT).b
- if true
, GUI actions are executed in the event dispatch thread (EDT). If false
, GUI
actions are executed in the current thread.public static boolean executeInEDT()
GuiQuery
and GuiTask
should be executed in the event dispatch thread
(EDT).true
if GUI actions are executed in the event dispatch thread, false
otherwise.@Nullable public static <T> T execute(@Nonnull Callable<T> query)
T
- the return type of the action to execute.query
- the query to execute.UnexpectedException
- wrapping any checked exception thrown when executing
the given query in the event dispatch thread (EDT). Unchecked exceptions are re-thrown without any
wrapping.execute(GuiQuery)
@Nullable public static <T> T execute(@Nonnull GuiQuery<T> query)
T
- the return type of the action to execute.query
- the query to execute.UnexpectedException
- wrapping any checked exception thrown when executing
the given query in the
event dispatch thread (EDT). Unchecked exceptions are re-thrown without any wrapping.executeInEDT()
,
execute(Callable)
public static void execute(@Nonnull GuiActionRunnable task)
task
- the task to execute.UnexpectedException
- wrapping any checked exception thrown when executing
the given query in the event dispatch thread (EDT). Unchecked exceptions are re-thrown without any
wrapping.executeInEDT()
,
execute(GuiTask)
public static void execute(@Nonnull GuiTask task)
task
- the task to execute.UnexpectedException
- wrapping any checked exception thrown when executing
the given query in the
event dispatch thread (EDT). Unchecked exceptions are re-thrown without any wrapping.executeInEDT()
,
execute(GuiActionRunnable)
Copyright © 2014–2019 AssertJ. All rights reserved.