Class FXInstance
java.lang.Object
madkit.internal.FXInstance
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static boolean
static void
setHeadlessMode
(boolean inhibit) If set totrue
, the application will run in headless mode and will not start the JavaFX application.static void
setStarted
(boolean isStarted) static void
Starts the JavaFX application if it is not already started and not in headless mode.
-
Method Details
-
startFX
Starts the JavaFX application if it is not already started and not in headless mode.- Parameters:
logger
- the logger to use
-
setHeadlessMode
public static void setHeadlessMode(boolean inhibit) If set totrue
, the application will run in headless mode and will not start the JavaFX application. It will inhibit the JavaFX initialization and calls toFXExecutor.runLater(Runnable)
andFXExecutor.runAndWait(Runnable)
This is useful for running the application in environments that do not support JavaFX.- Parameters:
inhibit
-true
to set headless mode
-
isStarted
public static boolean isStarted()- Returns:
- the isStarted
-
setStarted
public static void setStarted(boolean isStarted) - Parameters:
isStarted
- the isStarted to set
-
isHeadlessMode
public static boolean isHeadlessMode()- Returns:
- the headlessMode
-