public class EdtHelper extends Object
Constructor and Description |
---|
EdtHelper() |
Modifier and Type | Method and Description |
---|---|
<T> T |
callAndWait(Callable<T> c)
Invokes the supplied
Callable on the EDT, waits until it is
finished execution and returns the result of invoking Callable.call() . |
void |
callAndWait(Runnable r)
Invoke the supplied
Runnable on the EDT. |
public void callAndWait(Runnable r) throws InvocationTargetException, InterruptedException
Runnable
on the EDT.r
- encapsulates the code to runInvocationTargetException
- encapsulates the actual exception
that occurs when executing this code.InterruptedException
public <T> T callAndWait(Callable<T> c) throws InvocationTargetException, InterruptedException
Callable
on the EDT, waits until it is
finished execution and returns the result of invoking Callable.call()
.c
- encapsulates the code to executeInvocationTargetException
- indicates an exception occurred when executing the callableInterruptedException
Copyright © 2015. All Rights Reserved.