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

public Class PlatformImpl

extends Object
Class Inheritance
Imports
com.sun.javafx.PlatformUtil, .PreviewFeature, .SecurityUtil, com.sun.javafx.application.preferences.PlatformPreferences, .PreferenceMapping, com.sun.javafx.css.StyleManager, com.sun.javafx.tk.TKListener, .TKStage, .Toolkit, com.sun.javafx.util.Logging, .ModuleHelper, .Utils, java.lang.module.ModuleDescriptor, java.lang.reflect.InvocationTargetException, .Method, java.util.ArrayList, .HashMap, .List, .Map, .Optional, .Set, java.util.concurrent.CopyOnWriteArraySet, .CountDownLatch, java.util.concurrent.atomic.AtomicBoolean, .AtomicInteger, java.util.function.Predicate, javafx.application.Application, .ConditionalFeature, javafx.beans.property.BooleanProperty, .SimpleBooleanProperty, javafx.scene.Scene

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

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 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
public static final int
MAX_NESTED_EVENT_LOOPS

The maximum number of nested event loops.

private static AtomicInteger
private static AtomicInteger
private static AtomicBoolean
private static final CountDownLatch
private static final PlatformPreferences
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
private static void
public static void
checkPreferencesSupport()

Emits a one-time warning on macOS if we're running with AWT and the "apple.awt.application.appearance=system" property is not set (see JDK-8235363).

public static void
exit()

public static PlatformPreferences
private static void
private static void
public static void
initPreferences(Map<String, Class<?>> platformKeys, Map<String, PreferenceMapping<?, ?>>
a map of platform-specific keys to well-known keys
platformKeyMappings
,
Map<String, Object>
the initial set of platform preferences
preferences
)

Called by Glass when the toolkit is initialized.

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
public static void
updatePreferences(Map<String, Object>
a map that includes the changed preferences
preferences
)

Called by Glass when one or several platform preferences have changed.

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
finishListenersback to summary
private static Set<PlatformImpl.FinishListener> finishListeners
firstWindowShownback to summary
private static volatile boolean firstWindowShown
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
MAX_NESTED_EVENT_LOOPSback to summary
public static final int MAX_NESTED_EVENT_LOOPS

The maximum number of nested event loops.

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
platformPreferencesback to summary
private static final PlatformPreferences platformPreferences
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

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)
checkForClassback to summary
private static Boolean checkForClass(String classname)
checkHighContrastThemeChangedback to summary
private static void checkHighContrastThemeChanged(Map<String, Object> preferences)
checkIdleback to summary
private static void checkIdle()
checkPreferencesSupportback to summary
public static void checkPreferencesSupport()

Emits a one-time warning on macOS if we're running with AWT and the "apple.awt.application.appearance=system" property is not set (see JDK-8235363).

exitback to summary
public static void exit()
getPlatformPreferencesback to summary
public static PlatformPreferences getPlatformPreferences()
initDeviceDetailsFXCanvasback to summary
private static void initDeviceDetailsFXCanvas()
initFXCanvasback to summary
private static void initFXCanvas()
initPreferencesback to summary
public static void initPreferences(Map<String, Class<?>> platformKeys, Map<String, PreferenceMapping<?, ?>> platformKeyMappings, Map<String, Object> preferences)

Called by Glass when the toolkit is initialized.

Parameters
platformKeyMappings:Map<String, PreferenceMapping<?, ?>>

a map of platform-specific keys to well-known keys

preferences:Map<String, Object>

the initial set of platform preferences

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()
updatePreferencesback to summary
public static void updatePreferences(Map<String, Object> preferences)

Called by Glass when one or several platform preferences have changed.

This method can be called on any thread. The supplied preferences map may include all platform preferences, or only the changed preferences. If a preference was removed, the corresponding key is mapped to null.

Parameters
preferences:Map<String, Object>

a map that includes the changed preferences

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)