public class JFXAccessor extends Object
Constructor and Description |
---|
JFXAccessor() |
Modifier and Type | Method and 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 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. |
public static boolean isJFXAvailable()
public static void runOnJFXThread(boolean wait, Runnable task)
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.wait
- task
- isJFXThreadOrHasJFXThreadStopped()
public static Thread getJFXThread() throws NativeWindowException
NativeWindowException
public static String getJFXThreadName()
public static boolean hasJFXThreadStopped()
public static boolean isJFXThread()
public static boolean isJFXThreadOrHasJFXThreadStopped()
public static AbstractGraphicsDevice getDevice(javafx.stage.Window stageWindow) throws NativeWindowException, UnsupportedOperationException
stageWindow
- the JavaFX top heavyweight window handleNativeWindowException
- if an exception occurs retrieving the window handle or deriving the native deviceUnsupportedOperationException
- if the windowing system is not supportedpublic static AbstractGraphicsScreen getScreen(AbstractGraphicsDevice device, int screen)
device
- screen
- -1 is default screen of the given device, e.g. maybe 0 or determined by native API. >= 0 is specific screenpublic static int getNativeVisualID(AbstractGraphicsDevice device, long windowHandle)
public static long getWindowHandle(javafx.stage.Window stageWindow) throws NativeWindowException
stageWindow
- the JavaFX top heavyweight window handleNativeWindowException
- if an exception occurs retrieving the window handleCopyright 2010 JogAmp Community.