java.lang.Object
jfxtras.util.PlatformUtil
Created by Tom Eugelink on 26-12-13.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
runAndWait
(Runnable runnable) Invokes a Runnable in JFX Thread and waits until it's finished.static <V> V
runAndWait
(Callable<V> callable) Invokes a Callable in JFX Thread and waits until it's finished.
-
Constructor Details
-
PlatformUtil
public PlatformUtil()
-
-
Method Details
-
runAndWait
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.- Parameters:
runnable
- The Runnable that has to be executed on JFX application thread.- Throws:
RuntimeException
- which wraps a possible InterruptedException or ExecutionException
-
runAndWait
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.- Parameters:
callable
- The Callable that has to be executed on JFX application thread.- Returns:
- the result of callable.call();
- Throws:
RuntimeException
- which wraps a possible Exception, InterruptedException or ExecutionException
-