Top Inners Fields Constructors Methods
com.sun.javafx.application

public Class PlatformImpl

extends Object
Class Inheritance
Static Imports
com.sun.javafx.FXPermissions.CREATE_TRANSPARENT_WINDOW_PERMISSION

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
public static enum
PlatformImpl.HighContrastScheme

Enumeration of possible high contrast scheme values.

Field Summary

Modifier and TypeField and Description
private static BooleanProperty
private static String
private static CountDownLatch
private static String
private static boolean
private static final boolean
private static Set<PlatformImpl.FinishListener>
private static volatile boolean
private static final FXPermission
private static Boolean
private static Boolean
private static Boolean
private static Boolean
private static Boolean
private static volatile boolean
private static AtomicBoolean
private static boolean
private static Boolean
private static Boolean
private static Boolean
private static Boolean
private static boolean
private static Boolean
private static Boolean
private static boolean
private static Boolean
private static volatile boolean
private static AtomicBoolean
private static AtomicInteger
private static AtomicInteger
private static AtomicBoolean
private static final CountDownLatch
private static AtomicBoolean
private static final Object
private static CountDownLatch
private static boolean
private static AtomicBoolean
private static TKListener
private static final boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
private static void
public static BooleanProperty
private static void
addExportsToFXCanvas(Class<?> fxCanvasClass)

public static void
public static void
private static Boolean
checkForClass(String classname)

private static void
public static void
exit()

private static void
private static void
private static void
private static void
invokeSwingFXUtilsMethod(final String methodName)

public static boolean

Returns:

true if using caspian stylesheet
isCaspian
()

Current Platform User Agent Stylesheet is Caspian.

public static boolean

Returns:

true if the context-sensitive algorithm for focus navigation is used
isContextual2DNavigation
()

Return whether or not focus navigation between controls is context- sensitive.

public static boolean
public static boolean
public static boolean

Returns:

true if using modena stylesheet
isModena
()

Current Platform User Agent Stylesheet is Modena.

public static boolean
private static boolean
public static boolean

Returns:

the current state of the flag.
isTaskbarApplication
()

Returns the current value of the taskBarApplication flag.

private static void
notifyFinishListeners(boolean exitCalled)

private static void
public static void
public static void
private static void
runAndWait(final Runnable r, boolean exiting)

public static void
runLater(final Runnable r)

private static void
runLater(final Runnable r, boolean exiting)

public static boolean
public static void
setApplicationName(final Class<T>
the Application class.
appClass
)

Sets the name of the this application based on the Application class.

public static void
setDefaultPlatformUserAgentStylesheet()

Set the platform user agent stylesheet to the default.

public static void
setImplicitExit(boolean implicitExit)

public static void
setPlatformUserAgentStylesheet(final String stylesheetUrl)

Set the platform user agent stylesheet to the given URL.

public static void
setTaskbarApplication(boolean
the new value of this attribute
taskbarApplication
)

Set a flag indicating whether this application should show up in the task bar.

public static void
startup(final Runnable r)

This method is invoked typically on the main thread.

public static void
startup(final Runnable r, boolean preventDuplicateCalls)

This method is invoked typically on the main thread.

pack-priv static CountDownLatch
public static void
private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessibilityActiveback to summary
private static BooleanProperty accessibilityActive
accessibilityThemeback to summary
private static String accessibilityTheme
allNestedLoopsExitedLatchback to summary
private static CountDownLatch allNestedLoopsExitedLatch
applicationTypeback to summary
private static String applicationType
contextual2DNavigationback to summary
private static boolean contextual2DNavigation
DEBUGback to summary
private static final boolean DEBUG
Annotations
@SuppressWarnings:removal
finishListenersback to summary
private static Set<PlatformImpl.FinishListener> finishListeners
firstWindowShownback to summary
private static volatile boolean firstWindowShown
FXCANVAS_PERMISSIONback to summary
private static final FXPermission FXCANVAS_PERMISSION
hasMultiTouchback to summary
private static Boolean hasMultiTouch
hasPointerback to summary
private static Boolean hasPointer
hasTouchback to summary
private static Boolean hasTouch
hasTwoLevelFocusback to summary
private static Boolean hasTwoLevelFocus
hasVirtualKeyboardback to summary
private static Boolean hasVirtualKeyboard
implicitExitback to summary
private static volatile boolean implicitExit
initializedback to summary
private static AtomicBoolean initialized
isCaspianback to summary
private static boolean isCaspian
isControlsSupportedback to summary
private static Boolean isControlsSupported
isFXMLSupportedback to summary
private static Boolean isFXMLSupported
isGraphicsSupportedback to summary
private static Boolean isGraphicsSupported
isMediaSupportedback to summary
private static Boolean isMediaSupported
isModenaback to summary
private static boolean isModena
isSwingSupportedback to summary
private static Boolean isSwingSupported
isSWTSupportedback to summary
private static Boolean isSWTSupported
isThreadMergedback to summary
private static boolean isThreadMerged
isWebSupportedback to summary
private static Boolean isWebSupported
lastWindowClosedback to summary
private static volatile boolean lastWindowClosed
listenersRegisteredback to summary
private static AtomicBoolean listenersRegistered
numWindowsback to summary
private static AtomicInteger numWindows
pendingRunnablesback to summary
private static AtomicInteger pendingRunnables
platformExitback to summary
private static AtomicBoolean platformExit
platformExitLatchback to summary
private static final CountDownLatch platformExitLatch
reallyIdleback to summary
private static AtomicBoolean reallyIdle
runLaterLockback to summary
private static final Object runLaterLock
startupLatchback to summary
private static CountDownLatch startupLatch
taskbarApplicationback to summary
private static boolean taskbarApplication
toolkitExitback to summary
private static AtomicBoolean toolkitExit
toolkitListenerback to summary
private static TKListener toolkitListener
verboseback to summary
private static final boolean verbose
Annotations
@SuppressWarnings:removal

Constructor Detail

PlatformImplback to summary
public PlatformImpl()

Method Detail

_setAccessibilityThemeback to summary
private static void _setAccessibilityTheme(String platformTheme)
_setPlatformUserAgentStylesheetback to summary
private static void _setPlatformUserAgentStylesheet(String stylesheetUrl)
accessibilityActivePropertyback to summary
public static BooleanProperty accessibilityActiveProperty()
addExportsToFXCanvasback to summary
private static void addExportsToFXCanvas(Class<?> fxCanvasClass)
addListenerback to summary
public static void addListener(PlatformImpl.FinishListener l)
addNoTransparencyStylesheetToSceneback to summary
public static void addNoTransparencyStylesheetToScene(final Scene scene)
Annotations
@SuppressWarnings:removal
checkForClassback to summary
private static Boolean checkForClass(String classname)
checkIdleback to summary
private static void checkIdle()
exitback to summary
public static void exit()
initDeviceDetailsFXCanvasback to summary
private static void initDeviceDetailsFXCanvas()
initFXCanvasback to summary
private static void initFXCanvas()
installFwEventQueueback to summary
private static void installFwEventQueue()
invokeSwingFXUtilsMethodback to summary
private static void invokeSwingFXUtilsMethod(final String methodName)
isCaspianback to summary
public static boolean isCaspian()

Current Platform User Agent Stylesheet is Caspian.

Note

Please think hard before using this as we really want to avoid special cases in the platform for specific themes. This was added to allow tempory work arounds in the platform for bugs.

Returns:boolean

true if using caspian stylesheet

isContextual2DNavigationback to summary
public static boolean isContextual2DNavigation()

Return whether or not focus navigation between controls is context- sensitive.

Returns:boolean

true if the context-sensitive algorithm for focus navigation is used

isFxApplicationThreadback to summary
public static boolean isFxApplicationThread()
isImplicitExitback to summary
public static boolean isImplicitExit()
isModenaback to summary
public static boolean isModena()

Current Platform User Agent Stylesheet is Modena.

Note

Please think hard before using this as we really want to avoid special cases in the platform for specific themes. This was added to allow tempory work arounds in the platform for bugs.

Returns:boolean

true if using modena stylesheet

isSupportedback to summary
public static boolean isSupported(ConditionalFeature feature)
isSupportedImplback to summary
private static boolean isSupportedImpl(ConditionalFeature feature)
isTaskbarApplicationback to summary
public static boolean isTaskbarApplication()

Returns the current value of the taskBarApplication flag.

Returns:boolean

the current state of the flag.

notifyFinishListenersback to summary
private static void notifyFinishListeners(boolean exitCalled)
removeFwEventQueueback to summary
private static void removeFwEventQueue()
removeListenerback to summary
public static void removeListener(PlatformImpl.FinishListener l)
runAndWaitback to summary
public static void runAndWait(final Runnable r)
runAndWaitback to summary
private static void runAndWait(final Runnable r, boolean exiting)
runLaterback to summary
public static void runLater(final Runnable r)
runLaterback to summary
private static void runLater(final Runnable r, boolean exiting)
setAccessibilityThemeback to summary
public static boolean setAccessibilityTheme(String platformTheme)
setApplicationNameback to summary
public static void setApplicationName(final Class<T> appClass)

Sets the name of the this application based on the Application class. This method is called by the launcher, and is not called from the FX Application Thread, so we need to do it in a runLater. We do not need to wait for the result since it will complete before the Application start() method is called regardless.

Parameters
appClass:Class<T>

the Application class.

setDefaultPlatformUserAgentStylesheetback to summary
public static void setDefaultPlatformUserAgentStylesheet()

Set the platform user agent stylesheet to the default.

setImplicitExitback to summary
public static void setImplicitExit(boolean implicitExit)
setPlatformUserAgentStylesheetback to summary
public static void setPlatformUserAgentStylesheet(final String stylesheetUrl)

Set the platform user agent stylesheet to the given URL. This method has special handling for platform theme name constants.

setTaskbarApplicationback to summary
public static void setTaskbarApplication(boolean taskbarApplication)

Set a flag indicating whether this application should show up in the task bar. The default value is true.

Parameters
taskbarApplication:boolean

the new value of this attribute

startupback to summary
public static void startup(final Runnable r)

This method is invoked typically on the main thread. At this point, the JavaFX Application Thread has not been started. Any attempt to call startup more than once results in all subsequent calls turning into nothing more than a runLater call with the provided Runnable being called.

startupback to summary
public static void startup(final Runnable r, boolean preventDuplicateCalls)

This method is invoked typically on the main thread. At this point, the JavaFX Application Thread has not been started. If preventDuplicateCalls is true, calling this method multiple times will result in an IllegalStateException. If it is false, calling this method multiple times will result in all subsequent calls turning into nothing more than a runLater call with the provided Runnable being called.

test_getPlatformExitLatchback to summary
pack-priv static CountDownLatch test_getPlatformExitLatch()
tkExitback to summary
public static void tkExit()
waitForStartback to summary
private static void waitForStart()
com.sun.javafx.application back to summary

public Interface PlatformImpl.FinishListener


Method Summary

Modifier and TypeMethod and Description
public void
public void
idle(boolean implicitExit)

Method Detail

exitCalledback to summary
public void exitCalled()
idleback to summary
public void idle(boolean implicitExit)
com.sun.javafx.application back to summary

public final Enum PlatformImpl.HighContrastScheme

extends Enum<PlatformImpl.HighContrastScheme>
Class Inheritance

Enumeration of possible high contrast scheme values. For each scheme, a theme key is defined. These keys can be used, for instance, in a resource bundle that defines the theme name values for supported locales. The high contrast feature may not be available on all platforms.

Field Summary

Modifier and TypeField and Description
public static final PlatformImpl.HighContrastScheme
public static final PlatformImpl.HighContrastScheme
public static final PlatformImpl.HighContrastScheme
public static final PlatformImpl.HighContrastScheme
private final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

the name of the enum constant or null if not found
fromThemeName
(Function<String, String>
a Function that returns a string for a given theme key string.
keyFunction
,
String
a string with the theme name
themeName
)

Given a theme name string, this method finds the possible enum constant for which the result of a function, applying its theme key, matches the theme name.

public String
public static PlatformImpl.HighContrastScheme
public static PlatformImpl.HighContrastScheme[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

HIGH_CONTRAST_1back to summary
public static final PlatformImpl.HighContrastScheme HIGH_CONTRAST_1
HIGH_CONTRAST_2back to summary
public static final PlatformImpl.HighContrastScheme HIGH_CONTRAST_2
HIGH_CONTRAST_BLACKback to summary
public static final PlatformImpl.HighContrastScheme HIGH_CONTRAST_BLACK
HIGH_CONTRAST_WHITEback to summary
public static final PlatformImpl.HighContrastScheme HIGH_CONTRAST_WHITE
themeKeyback to summary
private final String themeKey

Constructor Detail

HighContrastSchemeback to summary
private HighContrastScheme(String themeKey)

Method Detail

fromThemeNameback to summary
public static String fromThemeName(Function<String, String> keyFunction, String themeName)

Given a theme name string, this method finds the possible enum constant for which the result of a function, applying its theme key, matches the theme name. An example of such function can be ResourceBundle::getString, as java.util.ResourceBundle#getString(String) returns a string for the given key.

Parameters
keyFunction:Function<String, String>

a Function that returns a string for a given theme key string.

themeName:String

a string with the theme name

Returns:String

the name of the enum constant or null if not found

getThemeKeyback to summary
public String getThemeKey()
valueOfback to summary
public static PlatformImpl.HighContrastScheme valueOf(String name)
valuesback to summary
public static PlatformImpl.HighContrastScheme[] values()