Package 

Class ApplicationThreadExtensionsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <T extends Any> T syncRunLater(Function0<T> task) Runs the given task on the FX thread and waits for the task to finish, returning any value the task returns.
      final static <T extends Any> T syncRunOnFXThread(Function0<T> task) Checks if the current thread is the FX Application thread and calls syncRunLater if so, otherwise runs the task.
      final static Unit runOnFXThread(Function0<Unit> task) Checks if the current thread is the FX Application thread and calls runLater if so, otherwise runs the task.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • syncRunLater

         final static <T extends Any> T syncRunLater(Function0<T> task)

        Runs the given task on the FX thread and waits for the task to finish, returning any value the task returns. Throws an exception if the task takes more than a given amount of milliseconds.

        Parameters:
        task - the task to execute.
      • syncRunOnFXThread

         final static <T extends Any> T syncRunOnFXThread(Function0<T> task)

        Checks if the current thread is the FX Application thread and calls syncRunLater if so, otherwise runs the task.

        Parameters:
        task - the task to execute.
      • runOnFXThread

         final static Unit runOnFXThread(Function0<Unit> task)

        Checks if the current thread is the FX Application thread and calls runLater if so, otherwise runs the task.

        Parameters:
        task - the task to execute.