Package jfxtras.util

Class PlatformUtil

java.lang.Object
jfxtras.util.PlatformUtil

public class PlatformUtil extends Object
Created by Tom Eugelink on 26-12-13.
  • Constructor Details

    • PlatformUtil

      public PlatformUtil()
  • Method Details

    • runAndWait

      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.
      Parameters:
      runnable - The Runnable that has to be executed on JFX application thread.
      Throws:
      RuntimeException - which wraps a possible InterruptedException or ExecutionException
    • runAndWait

      public 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.
      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