Top Fields Constructors Methods
com.sun.glass.ui.mac

pack-priv final Class MacApplication

extends Application
implements InvokeLaterSubmitter
Class Inheritance
All Implemented Interfaces
com.sun.glass.ui.InvokeLaterDispatcher.InvokeLaterSubmitter
Imports
com.sun.glass.events.KeyEvent, com.sun.glass.ui.*, .CommonDialogs.ExtensionFilter, .CommonDialogs.FileChooserResult, com.sun.javafx.application.preferences.PreferenceMapping, com.sun.javafx.util.Logging, javafx.scene.paint.Color, java.io.File, java.nio.ByteBuffer, .IntBuffer, java.util.Map, java.util.concurrent.CountDownLatch, .TimeUnit

Field Summary

Modifier and TypeField and Description
private Menu
private String
private static final String
private static final String
private static final String
private boolean
private long
private boolean
private final InvokeLaterDispatcher
private boolean
private static final CountDownLatch
private final CountDownLatch
private static final String
Inherited from com.sun.glass.ui.Application:
name

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected Object
private native Object
private native void
_finishTerminating(long delegateHandle)

private native String
private native String
protected native int
pack-priv static native int
_getMacKey(int code)

private native Map<String, Object>
_getPlatformPreferences(long delegateHandle)

private native void
private native void
pack-priv native long
_initDelegate(ClassLoader classLoader, Runnable launchable, boolean isTaskbarApplication)

private static native void
_initIDs(boolean disableSyncRendering)

protected native void
protected void
protected native int
private native boolean
protected void
private native void
pack-priv native void
_runLoop(long delegate)

private native void
protected boolean
protected boolean
protected native boolean
protected boolean
protected boolean
private native void
public void
checkPlatformPreferencesSupport()

Overrides com.sun.glass.ui.Application.checkPlatformPreferencesSupport.

Checks whether there are any problems with platform preferences detection, and if so, emits a warning.

public Accessible
public Cursor
public Cursor
createCursor(int x, int y, Pixels pixels)

Implements abstract com.sun.glass.ui.Application.createCursor.

public Pixels
createPixels(int width, int height, ByteBuffer data)

Implements abstract com.sun.glass.ui.Application.createPixels.

public Pixels
createPixels(int width, int height, ByteBuffer data, float scalex, float scaley)

Implements abstract com.sun.glass.ui.Application.createPixels.

public Pixels
createPixels(int width, int height, IntBuffer data)

Implements abstract com.sun.glass.ui.Application.createPixels.

public Pixels
createPixels(int width, int height, IntBuffer data, float scalex, float scaley)

Implements abstract com.sun.glass.ui.Application.createPixels.

public GlassRobot
public Timer
public View
public Window
createWindow(Window owner, Screen screen, int styleMask)

Implements abstract com.sun.glass.ui.Application.createWindow.

Create a window.

private static void
finishKeepAliveThread()

Terminates the KeepAlive thread.

protected void
public Menu
public String
getDataDirectory()

Overrides com.sun.glass.ui.Application.getDataDirectory.

Gets a platform specific path that can be used to store application data.

public Map<String, PreferenceMapping<?, ?>>
getPlatformKeyMappings()

Overrides com.sun.glass.ui.Application.getPlatformKeyMappings.

Returns a map of platform-specific keys to platform-independent keys defined by JavaFX, including a function that maps the platform-specific value to the platform-independent value.

public Map<String, Class<?>>
getPlatformKeys()

Overrides com.sun.glass.ui.Application.getPlatformKeys.

Returns a mapping of platform-specific keys to the types of their values.

public Map<String, Object>
getPlatformPreferences()

Overrides com.sun.glass.ui.Application.getPlatformPreferences.

Returns the current set of platform properties as a map of platform-specific keys to arbitrary values.

public void
public void
installDefaultMenus(MenuBar menubar)

Overrides com.sun.glass.ui.Application.installDefaultMenus.

Install app's default native menus: on Mac OS X - Apple menu (showing the app name) with a single Quit menu item on Windows - NOP on Linux - NOP

pack-priv boolean
private void
protected void
protected void
protected void
runLoop(final Runnable launchable)

Implements abstract com.sun.glass.ui.Application.runLoop.

private void
private static void
startKeepAliveThread()

Starts a non-daemon KeepAlive thread to ensure that the JavaFX toolkit keeps running until the toolkit exits.

protected CommonDialogs.FileChooserResult
staticCommonDialogs_showFileChooser(Window owner, String folder, String filename, String title, int type, boolean multipleMode, CommonDialogs.ExtensionFilter[] extensionFilters, int defaultFilterIndex)

Implements abstract com.sun.glass.ui.Application.staticCommonDialogs_showFileChooser.

protected File
protected Size
protected void
protected int
protected native Screen[]
protected native double
protected int
protected int
protected int
protected int
protected long
public void
submitForLaterInvocation(Runnable r)

Implements com.sun.glass.ui.InvokeLaterDispatcher.InvokeLaterSubmitter.submitForLaterInvocation.

Submits the runnable to the native system for later execution and returns immediately.

pack-priv void
Inherited from com.sun.glass.ui.Application:
checkEventThreadcreateEventLoopcreateMenucreateMenucreateMenuBarcreateMenuItemcreateMenuItemcreateMenuItemcreateMenuItemcreateWindowGetApplicationgetDeviceDetailsgetEventHandlergetEventThreadgetKeyCodeForChargetNamehasMultiTouchhasPointerhasTouchhasTwoLevelFocushasVirtualKeyboardhasWindowManagerinvokeAndWaitinvokeLaterisEventThreadisKeyLockedisNestedLoopRunningloadNativeLibraryloadNativeLibrarymenuAboutActionnotifyDidFinishLaunchingnotifyDidHidenotifyDidReceiveMemoryWarningnotifyDidUnhidenotifyOpenFilesnotifyPreferencesChangednotifyRenderingFinishednotifyWillBecomeActivenotifyWillFinishLaunchingnotifyWillHidenotifyWillQuitnotifyWillResignActivenotifyWillUnhideoverrideNativeWindowHandlereportExceptionrunsetDeviceDetailssetEventHandlersetEventThreadsetNamesetTerminateWhenLastWindowClosedshouldTerminateWhenLastWindowClosedshouldUpdateWindowsupportsExtendedWindowssupportsInputMethodssupportsSystemMenusupportsTransparentWindowssupportsUnifiedWindowsterminate

Field Detail

appleMenuback to summary
private Menu appleMenu
applicationClassNameback to summary
private String applicationClassName
AWT_APPEARANCE_PROPERTYback to summary
private static final String AWT_APPEARANCE_PROPERTY
AWT_APPLICATION_CLASSback to summary
private static final String AWT_APPLICATION_CLASS
AWT_SYSTEM_APPEARANCEback to summary
private static final String AWT_SYSTEM_APPEARANCE
checkSystemAppearanceback to summary
private boolean checkSystemAppearance
delegateHandleback to summary
private long delegateHandle
firstDidResignActiveback to summary
private boolean firstDidResignActive
invokeLaterDispatcherback to summary
private final InvokeLaterDispatcher invokeLaterDispatcher
isTaskbarApplicationback to summary
private boolean isTaskbarApplication
keepAliveLatchback to summary
private static final CountDownLatch keepAliveLatch
reactivationLatchback to summary
private final CountDownLatch reactivationLatch
SUPPRESS_AWT_WARNING_PROPERTYback to summary
private static final String SUPPRESS_AWT_WARNING_PROPERTY

Constructor Detail

MacApplicationback to summary
pack-priv MacApplication()

Method Detail

_enterNestedEventLoopback to summary
protected Object _enterNestedEventLoop()

Implements abstract com.sun.glass.ui.Application._enterNestedEventLoop.

Annotations
@Override
_enterNestedEventLoopImplback to summary
private native Object _enterNestedEventLoopImpl()
_finishTerminatingback to summary
private native void _finishTerminating(long delegateHandle)
_getApplicationClassNameback to summary
private native String _getApplicationClassName()
_getDataDirectoryback to summary
private native String _getDataDirectory()
_getKeyCodeForCharback to summary
protected native int _getKeyCodeForChar(char c, int hint)

Implements abstract com.sun.glass.ui.Application._getKeyCodeForChar.

Annotations
@Override
_getMacKeyback to summary
pack-priv static native int _getMacKey(int code)
_getPlatformPreferencesback to summary
private native Map<String, Object> _getPlatformPreferences(long delegateHandle)
_hideback to summary
private native void _hide()
_hideOtherApplicationsback to summary
private native void _hideOtherApplications()
_initDelegateback to summary
pack-priv native long _initDelegate(ClassLoader classLoader, Runnable launchable, boolean isTaskbarApplication)
_initIDsback to summary
private static native void _initIDs(boolean disableSyncRendering)
_invokeAndWaitback to summary
protected native void _invokeAndWait(Runnable runnable)

Implements abstract com.sun.glass.ui.Application._invokeAndWait.

Annotations
@Override
_invokeLaterback to summary
protected void _invokeLater(Runnable runnable)

Implements abstract com.sun.glass.ui.Application._invokeLater.

Annotations
@Override
_isKeyLockedback to summary
protected native int _isKeyLocked(int keyCode)

Overrides com.sun.glass.ui.Application._isKeyLocked.

Annotations
@Override
_isTriggerReactivationback to summary
private native boolean _isTriggerReactivation()
_leaveNestedEventLoopback to summary
protected void _leaveNestedEventLoop(Object retValue)

Implements abstract com.sun.glass.ui.Application._leaveNestedEventLoop.

Annotations
@Override
_leaveNestedEventLoopImplback to summary
private native void _leaveNestedEventLoopImpl(Object retValue)
_runLoopback to summary
pack-priv native void _runLoop(long delegate)
_submitForLaterInvocationback to summary
private native void _submitForLaterInvocation(Runnable r)
_supportsExtendedWindowsback to summary
protected boolean _supportsExtendedWindows()

Implements abstract com.sun.glass.ui.Application._supportsExtendedWindows.

Annotations
@Override
_supportsInputMethodsback to summary
protected boolean _supportsInputMethods()

Overrides com.sun.glass.ui.Application._supportsInputMethods.

Annotations
@Override
_supportsSystemMenuback to summary
protected native boolean _supportsSystemMenu()

Overrides com.sun.glass.ui.Application._supportsSystemMenu.

Annotations
@Override
_supportsTransparentWindowsback to summary
protected boolean _supportsTransparentWindows()

Implements abstract com.sun.glass.ui.Application._supportsTransparentWindows.

Annotations
@Override
_supportsUnifiedWindowsback to summary
protected boolean _supportsUnifiedWindows()

Implements abstract com.sun.glass.ui.Application._supportsUnifiedWindows.

Annotations
@Override
_unhideAllApplicationsback to summary
private native void _unhideAllApplications()
checkPlatformPreferencesSupportback to summary
public void checkPlatformPreferencesSupport()

Overrides com.sun.glass.ui.Application.checkPlatformPreferencesSupport.

Doc from com.sun.glass.ui.Application.checkPlatformPreferencesSupport.

Checks whether there are any problems with platform preferences detection, and if so, emits a warning.

Annotations
@Override
createAccessibleback to summary
public Accessible createAccessible()

Overrides com.sun.glass.ui.Application.createAccessible.

Annotations
@Override
createCursorback to summary
public Cursor createCursor(int type)

Implements abstract com.sun.glass.ui.Application.createCursor.

Annotations
@Override
createCursorback to summary
public Cursor createCursor(int x, int y, Pixels pixels)

Implements abstract com.sun.glass.ui.Application.createCursor.

Annotations
@Override
createPixelsback to summary
public Pixels createPixels(int width, int height, ByteBuffer data)

Implements abstract com.sun.glass.ui.Application.createPixels.

Annotations
@Override
createPixelsback to summary
public Pixels createPixels(int width, int height, ByteBuffer data, float scalex, float scaley)

Implements abstract com.sun.glass.ui.Application.createPixels.

Annotations
@Override
createPixelsback to summary
public Pixels createPixels(int width, int height, IntBuffer data)

Implements abstract com.sun.glass.ui.Application.createPixels.

Annotations
@Override
createPixelsback to summary
public Pixels createPixels(int width, int height, IntBuffer data, float scalex, float scaley)

Implements abstract com.sun.glass.ui.Application.createPixels.

Annotations
@Override
createRobotback to summary
public GlassRobot createRobot()

Implements abstract com.sun.glass.ui.Application.createRobot.

Annotations
@Override
createTimerback to summary
public Timer createTimer(Runnable runnable)

Implements abstract com.sun.glass.ui.Application.createTimer.

Annotations
@Override
createViewback to summary
public View createView()

Implements abstract com.sun.glass.ui.Application.createView.

Annotations
@Override
createWindowback to summary
public Window createWindow(Window owner, Screen screen, int styleMask)

Implements abstract com.sun.glass.ui.Application.createWindow.

Doc from com.sun.glass.ui.Application.createWindow.

Create a window. The styleMask argument is a bitmask of window styles as defined in the Window class. Note, however, that visual kinds (UNTITLED, TITLED, or TRANSPARENT) can't be combined together. Also, functional types (NORMAL, POPUP, or UTILITY) can't be combined together. A window is allowed to be of exactly one visual kind, and exactly one functional type.

Annotations
@Override
finishKeepAliveThreadback to summary
private static void finishKeepAliveThread()

Terminates the KeepAlive thread.

finishTerminatingback to summary
protected void finishTerminating()

Overrides com.sun.glass.ui.Application.finishTerminating.

Annotations
@Override
getAppleMenuback to summary
public Menu getAppleMenu()
getDataDirectoryback to summary
public String getDataDirectory()

Overrides com.sun.glass.ui.Application.getDataDirectory.

Doc from com.sun.glass.ui.Application.getDataDirectory.

Gets a platform specific path that can be used to store application data. The application name typically appears as part of the path. On some platforms, the path may not yet exist and the caller will need to create it.

Annotations
@Override
getPlatformKeyMappingsback to summary
public Map<String, PreferenceMapping<?, ?>> getPlatformKeyMappings()

Overrides com.sun.glass.ui.Application.getPlatformKeyMappings.

Doc from com.sun.glass.ui.Application.getPlatformKeyMappings.

Returns a map of platform-specific keys to platform-independent keys defined by JavaFX, including a function that maps the platform-specific value to the platform-independent value.

For example, the platform-specific key "Windows.UIColor.Foreground" is mapped to the key "foregroundColor", which makes it easier to write shared code without depending on platform-specific details.

The following platform-independent keys are currently supported, which correspond to the names of properties on the com.sun.javafx.application.preferences.PreferenceProperties class:

  • foregroundColor
  • backgroundColor
  • accentColor
  • reducedMotion
  • reducedTransparency
  • persistentScrollBars
Annotations
@Override
getPlatformKeysback to summary
public Map<String, Class<?>> getPlatformKeys()

Overrides com.sun.glass.ui.Application.getPlatformKeys.

Doc from com.sun.glass.ui.Application.getPlatformKeys.

Returns a mapping of platform-specific keys to the types of their values. Polymorphic types are supported by specifying the common base type; for example, a key can be mapped to Paint.class to support any type of paint.

Implementors must keep this map in sync with the mappings reported by the native Glass toolkit. If a native toolkit reports mappings for keys that are not contained in this map, the typed getters in javafx.application.Platform.Preferences might not throw IllegalArgumentException as specified.

Annotations
@Override
getPlatformPreferencesback to summary
public Map<String, Object> getPlatformPreferences()

Overrides com.sun.glass.ui.Application.getPlatformPreferences.

Doc from com.sun.glass.ui.Application.getPlatformPreferences.

Returns the current set of platform properties as a map of platform-specific keys to arbitrary values. This is a snapshot, and won't be updated. There are no guarantees on the implementation type, modifiability or serializability of the returned Map.

Annotations
@Override
installAppleMenuback to summary
public void installAppleMenu(MenuBar menubar)
installDefaultMenusback to summary
public void installDefaultMenus(MenuBar menubar)

Overrides com.sun.glass.ui.Application.installDefaultMenus.

Doc from com.sun.glass.ui.Application.installDefaultMenus.

Install app's default native menus: on Mac OS X - Apple menu (showing the app name) with a single Quit menu item on Windows - NOP on Linux - NOP

Annotations
@Override
isTriggerReactivationback to summary
pack-priv boolean isTriggerReactivation()
notifyApplicationDidTerminateback to summary
private void notifyApplicationDidTerminate()
notifyDidBecomeActiveback to summary
protected void notifyDidBecomeActive()

Overrides com.sun.glass.ui.Application.notifyDidBecomeActive.

Annotations
@Override
notifyDidResignActiveback to summary
protected void notifyDidResignActive()

Overrides com.sun.glass.ui.Application.notifyDidResignActive.

Annotations
@Override
runLoopback to summary
protected void runLoop(final Runnable launchable)

Implements abstract com.sun.glass.ui.Application.runLoop.

Annotations
@Override
setEventThreadback to summary
private void setEventThread()
startKeepAliveThreadback to summary
private static void startKeepAliveThread()

Starts a non-daemon KeepAlive thread to ensure that the JavaFX toolkit keeps running until the toolkit exits. On other platforms, the JavaFX Application Thread is created as a non-daemon Java thread when the toolkit starts. On macOS, we use the existing AppKit thread as the JavaFX Application thread, and attach it to the JVM as a daemon thread. In the case of Swing / JavaFX interop, AWT attaches the AppKit thread as a daemon thread. Since there is no other non-daemon thread, we create one so that the JavaFX toolkit will not exit prematurely.

staticCommonDialogs_showFileChooserback to summary
protected CommonDialogs.FileChooserResult staticCommonDialogs_showFileChooser(Window owner, String folder, String filename, String title, int type, boolean multipleMode, CommonDialogs.ExtensionFilter[] extensionFilters, int defaultFilterIndex)

Implements abstract com.sun.glass.ui.Application.staticCommonDialogs_showFileChooser.

Annotations
@Override
staticCommonDialogs_showFolderChooserback to summary
protected File staticCommonDialogs_showFolderChooser(Window owner, String folder, String title)

Implements abstract com.sun.glass.ui.Application.staticCommonDialogs_showFolderChooser.

Annotations
@Override
staticCursor_getBestSizeback to summary
protected Size staticCursor_getBestSize(int width, int height)

Implements abstract com.sun.glass.ui.Application.staticCursor_getBestSize.

Annotations
@Override
staticCursor_setVisibleback to summary
protected void staticCursor_setVisible(boolean visible)

Implements abstract com.sun.glass.ui.Application.staticCursor_setVisible.

Annotations
@Override
staticPixels_getNativeFormatback to summary
protected int staticPixels_getNativeFormat()

Implements abstract com.sun.glass.ui.Application.staticPixels_getNativeFormat.

Annotations
@Override
staticScreen_getScreensback to summary
protected native Screen[] staticScreen_getScreens()

Implements abstract com.sun.glass.ui.Application.staticScreen_getScreens.

Annotations
@Override
staticScreen_getVideoRefreshPeriodback to summary
protected native double staticScreen_getVideoRefreshPeriod()

Implements abstract com.sun.glass.ui.Application.staticScreen_getVideoRefreshPeriod.

Annotations
@Override
staticTimer_getMaxPeriodback to summary
protected int staticTimer_getMaxPeriod()

Implements abstract com.sun.glass.ui.Application.staticTimer_getMaxPeriod.

Annotations
@Override
staticTimer_getMinPeriodback to summary
protected int staticTimer_getMinPeriod()

Implements abstract com.sun.glass.ui.Application.staticTimer_getMinPeriod.

Annotations
@Override
staticView_getMultiClickMaxXback to summary
protected int staticView_getMultiClickMaxX()

Implements abstract com.sun.glass.ui.Application.staticView_getMultiClickMaxX.

Annotations
@Override
staticView_getMultiClickMaxYback to summary
protected int staticView_getMultiClickMaxY()

Implements abstract com.sun.glass.ui.Application.staticView_getMultiClickMaxY.

Annotations
@Override
staticView_getMultiClickTimeback to summary
protected long staticView_getMultiClickTime()

Implements abstract com.sun.glass.ui.Application.staticView_getMultiClickTime.

Annotations
@Override
submitForLaterInvocationback to summary
public void submitForLaterInvocation(Runnable r)

Implements com.sun.glass.ui.InvokeLaterDispatcher.InvokeLaterSubmitter.submitForLaterInvocation.

Doc from com.sun.glass.ui.InvokeLaterDispatcher.InvokeLaterSubmitter.submitForLaterInvocation.

Submits the runnable to the native system for later execution and returns immediately.

Annotations
@Override
waitForReactivationback to summary
pack-priv void waitForReactivation()