public class PlatformUtil extends Object
Created by Tom Eugelink on 26-12-13.
Constructor and Description |
---|
PlatformUtil() |
Modifier and Type | Method and Description |
---|---|
static <V> V |
runAndWait(Callable<V> callable)
Invokes a Callable in JFX Thread and waits until it’s finished.
|
static void |
runAndWait(Runnable runnable)
Invokes a Runnable in JFX Thread and waits until it’s finished.
|
static void |
waitForPaintPulse() |
public static void runAndWait(Runnable runnable)
Invokes a Runnable in JFX Thread and waits until it’s finished. Similar to SwingUtilities.invokeAndWait. This method is not intended to be called from the FAT, but when this happens the runnable is executed synchronously.
runnable
- The Runnable that has to be executed on JFX application thread.RuntimeException
- which wraps a possible InterruptedException or ExecutionExceptionpublic static <V> V runAndWait(Callable<V> callable)
Invokes a Callable in JFX Thread and waits until it’s finished. Similar to SwingUtilities.invokeAndWait. This method is not intended to be called from the FAT, but when this happens the callable is executed synchronously.
callable
- The Callable that has to be executed on JFX application thread.RuntimeException
- which wraps a possible Exception, InterruptedException or ExecutionExceptionpublic static void waitForPaintPulse()