Class JFXAccessor


  • public class JFXAccessor
    extends Object
    • Constructor Detail

      • JFXAccessor

        public JFXAccessor()
    • Method Detail

      • isJFXAvailable

        public static boolean isJFXAvailable()
      • runOnJFXThread

        public static void runOnJFXThread​(boolean wait,
                                          Runnable task)
        Runs given task on the JFX Thread if it has not stopped and if caller is not already on the JFX Thread, otherwise execute given task on the current thread.
        Parameters:
        wait -
        task -
        See Also:
        isJFXThreadOrHasJFXThreadStopped()
      • getJFXThreadName

        public static String getJFXThreadName()
      • hasJFXThreadStopped

        public static boolean hasJFXThreadStopped()
        Returns:
        true if the JFX Thread has stopped
      • isJFXThread

        public static boolean isJFXThread()
        Returns:
        true if caller is on the JFX Thread
      • isJFXThreadOrHasJFXThreadStopped

        public static boolean isJFXThreadOrHasJFXThreadStopped()
        Returns:
        true if the JFX Thread has stopped or if caller is on the JFX Thread
      • getScreen

        public static AbstractGraphicsScreen getScreen​(AbstractGraphicsDevice device,
                                                       int screen)
        Parameters:
        device -
        screen - -1 is default screen of the given device, e.g. maybe 0 or determined by native API. >= 0 is specific screen
        Returns:
      • getNativeVisualID

        public static int getNativeVisualID​(AbstractGraphicsDevice device,
                                            long windowHandle)
      • getWindowHandle

        public static long getWindowHandle​(javafx.stage.Window stageWindow)
                                    throws NativeWindowException
        Parameters:
        stageWindow - the JavaFX top heavyweight window handle
        Returns:
        the native window handle
        Throws:
        NativeWindowException - if an exception occurs retrieving the window handle