Class UI

java.lang.Object
megalodonte.base.UI

public final class UI extends Object
Helper for running code on the JavaFX Application Thread. Wraps Platform.runLater(Runnable) for use from virtual threads or background work.
  • Constructor Details

    • UI

      public UI()
  • Method Details

    • runOnUi

      public static void runOnUi(Runnable task)
      Executes task on the JavaFX Application Thread. If already on the FX thread, runs immediately; otherwise schedules it.
      Parameters:
      task - the runnable to execute on the FX thread