Class CurrentThreadExecution
- java.lang.Object
-
- ch.sahits.game.openpatrician.utilities.javafx.CurrentThreadExecution
-
- All Implemented Interfaces:
IJavaFXApplicationThreadExecution
public class CurrentThreadExecution extends java.lang.Object implements IJavaFXApplicationThreadExecution
Implementation that executes in the calling thread.- Author:
- Andi Hotz, (c) Sahits GmbH, 2014 Created on Dec 08, 2014
-
-
Constructor Summary
Constructors Constructor Description CurrentThreadExecution()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(java.lang.Runnable executable)
Make sure the executable is run in the proper context.boolean
isFxApplicationThread()
Indicates if the current thread is already the thread on which the Runnable should be executed.
-
-
-
Method Detail
-
execute
public void execute(java.lang.Runnable executable)
Description copied from interface:IJavaFXApplicationThreadExecution
Make sure the executable is run in the proper context.- Specified by:
execute
in interfaceIJavaFXApplicationThreadExecution
- Parameters:
executable
- runnable that should be executed.
-
isFxApplicationThread
public boolean isFxApplicationThread()
Description copied from interface:IJavaFXApplicationThreadExecution
Indicates if the current thread is already the thread on which the Runnable should be executed.- Specified by:
isFxApplicationThread
in interfaceIJavaFXApplicationThreadExecution
- Returns:
- true if the Runnable can be executed on the same thread.
-
-