Top Description Fields Constructors Methods
com.sun.glass.ui.monocle

public abstract Class NativePlatform

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.glass.ui.monocle.X11Platform, com.sun.glass.ui.monocle.AndroidPlatform, com.sun.glass.ui.monocle.HeadlessPlatform, com.sun.glass.ui.monocle.LinuxPlatform
Imports
java.util.ArrayList, .List, java.util.function.Supplier, com.sun.javafx.logging.PlatformLogger, .PlatformLogger.Level, com.sun.javafx.util.Logging

Abstract of a platform on which JavaFX can run.

Field Summary

Modifier and TypeField and Description
protected AcceleratedScreen
private NativeCursor
private static InputDeviceRegistry
private final PlatformLogger
private final RunnableProcessor
protected List<NativeScreen>
protected static final boolean

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected abstract NativeCursor

Returns:

a new NativeCursor
createCursor
()

Creates the NativeCursor for this platform.

protected abstract InputDeviceRegistry

Returns:

a new InputDeviceRegistry
createInputDeviceRegistry
()

Creates the InputDeviceRegistry for this platform.

protected abstract NativeScreen

Returns:

a new NativeScreen
createScreen
()

Creates the NativeScreen for this platform.

protected synchronized List<NativeScreen>

Returns:

a list with all native screens. This list is never null, but it can be empty.
createScreens
()

Create NativeScreen instances for all available native screens.

public synchronized AcceleratedScreen

Returns:

an AcceleratedScreen for rendering using OpenGL
getAcceleratedScreen
(int[]
a sequence of pairs (GLAttibute, value)
attributes
)

Gets the AcceleratedScreen for this platform

pack-priv synchronized NativeCursor

Returns:

the NativeCursor
getCursor
()

Obtains the singleton NativeCursor

pack-priv synchronized InputDeviceRegistry

Returns:

the InputDeviceRegistry that maintains a list of input devices for this platform.
getInputDeviceRegistry
()

pack-priv RunnableProcessor

Returns:

the RunnableProcessor used to post events to the JavaFX event queue.
getRunnableProcessor
()

pack-priv synchronized NativeScreen

Returns:

the primaryscreen, or null if no screen is found.
getScreen
()

Obtains the NativeScreen instances.

pack-priv synchronized List<NativeScreen>
protected NativeCursor

Returns:

the passed in cursor
logSelectedCursor
(final NativeCursor
the native cursor in use, null is permitted
cursor
)

Log the name of the supplied native cursor class if required.

pack-priv void
shutdown()

Called once during JavaFX shutdown to release platform resources.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accScreenback to summary
protected AcceleratedScreen accScreen
cursorback to summary
private NativeCursor cursor
inputDeviceRegistryback to summary
private static InputDeviceRegistry inputDeviceRegistry
loggerback to summary
private final PlatformLogger logger
runnableProcessorback to summary
private final RunnableProcessor runnableProcessor
screensback to summary
protected List<NativeScreen> screens
useCursorback to summary
protected static final boolean useCursor

Constructor Detail

NativePlatformback to summary
protected NativePlatform()

Method Detail

createCursorback to summary
protected abstract NativeCursor createCursor()

Creates the NativeCursor for this platform. Called once.

Returns:NativeCursor

a new NativeCursor

createInputDeviceRegistryback to summary
protected abstract InputDeviceRegistry createInputDeviceRegistry()

Creates the InputDeviceRegistry for this platform. Called once.

Returns:InputDeviceRegistry

a new InputDeviceRegistry

createScreenback to summary
protected abstract NativeScreen createScreen()

Creates the NativeScreen for this platform. Called once.

Returns:NativeScreen

a new NativeScreen

createScreensback to summary
protected synchronized List<NativeScreen> createScreens()

Create NativeScreen instances for all available native screens. The default implementation of this method will invoke the createScreen method and return a list with a single screen only. Subclasses can override this and return a list with all screens. The approach to get this list is specific to the subclass and can be done in Java or in native code.

The first element in the returned list is considered to be the primary screen.

Returns:List<NativeScreen>

a list with all native screens. This list is never null, but it can be empty.

getAcceleratedScreenback to summary
public synchronized AcceleratedScreen getAcceleratedScreen(int[] attributes) throws GLException, UnsatisfiedLinkError

Gets the AcceleratedScreen for this platform

Parameters
attributes:int[]

a sequence of pairs (GLAttibute, value)

Returns:AcceleratedScreen

an AcceleratedScreen for rendering using OpenGL

Exceptions
GLException:
if no OpenGL surface could be created
UnsatisfiedLinkError:
if native graphics libraries could not be loaded for this platform.
getCursorback to summary
pack-priv synchronized NativeCursor getCursor()

Obtains the singleton NativeCursor

Returns:NativeCursor

the NativeCursor

getInputDeviceRegistryback to summary
pack-priv synchronized InputDeviceRegistry getInputDeviceRegistry()
Returns:InputDeviceRegistry

the InputDeviceRegistry that maintains a list of input devices for this platform.

getRunnableProcessorback to summary
pack-priv RunnableProcessor getRunnableProcessor()
Returns:RunnableProcessor

the RunnableProcessor used to post events to the JavaFX event queue.

getScreenback to summary
pack-priv synchronized NativeScreen getScreen()

Obtains the NativeScreen instances. This method will create NativeScreen instances for all native screens, and stores them internally. The main screen (primaryscreen) is returned.

Returns:NativeScreen

the primaryscreen, or null if no screen is found.

getScreensback to summary
pack-priv synchronized List<NativeScreen> getScreens()
logSelectedCursorback to summary
protected NativeCursor logSelectedCursor(final NativeCursor cursor)

Log the name of the supplied native cursor class if required.

Parameters
cursor:NativeCursor

the native cursor in use, null is permitted

Returns:NativeCursor

the passed in cursor

shutdownback to summary
pack-priv void shutdown()

Called once during JavaFX shutdown to release platform resources.