Package com.jogamp.nativewindow.javafx
Class JFXAccessor
- java.lang.Object
-
- com.jogamp.nativewindow.javafx.JFXAccessor
-
public class JFXAccessor extends Object
-
-
Constructor Summary
Constructors Constructor Description JFXAccessor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AbstractGraphicsDevice
getDevice(javafx.stage.Window stageWindow)
static Thread
getJFXThread()
static String
getJFXThreadName()
static int
getNativeVisualID(AbstractGraphicsDevice device, long windowHandle)
static AbstractGraphicsScreen
getScreen(AbstractGraphicsDevice device, int screen)
static long
getWindowHandle(javafx.stage.Window stageWindow)
static boolean
hasJFXThreadStopped()
static boolean
isJFXAvailable()
static boolean
isJFXThread()
static boolean
isJFXThreadOrHasJFXThreadStopped()
static void
runOnJFXThread(boolean wait, Runnable task)
Runs giventask
on the JFX Thread if it has not stopped and if caller is not already on the JFX Thread, otherwise execute giventask
on the current thread.
-
-
-
Method Detail
-
isJFXAvailable
public static boolean isJFXAvailable()
-
runOnJFXThread
public static void runOnJFXThread(boolean wait, Runnable task)
Runs giventask
on the JFX Thread if it has not stopped and if caller is not already on the JFX Thread, otherwise execute giventask
on the current thread.- Parameters:
wait
-task
-- See Also:
isJFXThreadOrHasJFXThreadStopped()
-
getJFXThread
public static Thread getJFXThread() throws NativeWindowException
- Throws:
NativeWindowException
-
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
-
getDevice
public static AbstractGraphicsDevice getDevice(javafx.stage.Window stageWindow) throws NativeWindowException, UnsupportedOperationException
- Parameters:
stageWindow
- the JavaFX top heavyweight window handle- Returns:
- the AbstractGraphicsDevice w/ the native device handle
- Throws:
NativeWindowException
- if an exception occurs retrieving the window handle or deriving the native deviceUnsupportedOperationException
- if the windowing system is not supported
-
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
-
-