public void dispatchOnFxThread ( Action action ) { if ( Platform . isFxApplicationThread ( ) ) { actionStream . push ( action ) ; } else { Platform . runLater ( ( ) -> actionStream . push ( action ) ) ; } }
Dispatch the given action . Dispatching is always done on the JavaFX application thread even if this method is called from another thread .