public class SwingThreadHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
invokeAndWait(java.lang.Runnable runnable,
ErrorLogger logger)
Invoke a runnable in the Swing Event Thread.
|
static void |
invokeLater(java.lang.Runnable runnable,
boolean postInQueue,
ErrorLogger logger)
Invoke a runnable in the Swing Event Thread.
|
public static void invokeLater(java.lang.Runnable runnable, boolean postInQueue, ErrorLogger logger)
run()
method will be called at a later time.runnable
- the runnablepostInQueue
- true if the runnable must be invoked later even if the caller is in the Swing Event Threadlogger
- the logger to call if the run method leads to an exception. The StackTrace of the exception will be printed on the consoel instead if the
logger is nullpublic static void invokeAndWait(java.lang.Runnable runnable, ErrorLogger logger)
run()
method will be called immedialtely and will be blockingrunnable
- the runnablelogger
- the logger to call if the run method leads to an exception. The StackTrace of the exception will be printed on the consoel instead if the
logger is null