Package com.sun.glass.ui.monocle
Class NativePlatform
java.lang.Object
com.sun.glass.ui.monocle.NativePlatform
- Direct Known Subclasses:
EGLPlatform
Abstract of a platform on which JavaFX can run.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AcceleratedScreenprotected List<NativeScreen>protected static final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract com.sun.glass.ui.monocle.NativeCursorCreates the NativeCursor for this platform.protected abstract com.sun.glass.ui.monocle.InputDeviceRegistryCreates the InputDeviceRegistry for this platform.protected abstract NativeScreenCreates the NativeScreen for this platform.protected List<NativeScreen>CreateNativeScreeninstances for all available native screens.getAcceleratedScreen(int[] attributes) Gets the AcceleratedScreen for this platformprotected com.sun.glass.ui.monocle.NativeCursorlogSelectedCursor(com.sun.glass.ui.monocle.NativeCursor cursor) Log the name of the supplied native cursor class if required.
-
Field Details
-
screens
-
accScreen
-
useCursor
protected static final boolean useCursor
-
-
Constructor Details
-
NativePlatform
protected NativePlatform()
-
-
Method Details
-
createInputDeviceRegistry
protected abstract com.sun.glass.ui.monocle.InputDeviceRegistry createInputDeviceRegistry()Creates the InputDeviceRegistry for this platform. Called once.- Returns:
- a new InputDeviceRegistry
-
createCursor
protected abstract com.sun.glass.ui.monocle.NativeCursor createCursor()Creates the NativeCursor for this platform. Called once.- Returns:
- a new NativeCursor
-
createScreen
Creates the NativeScreen for this platform. Called once.- Returns:
- a new NativeScreen
-
createScreens
CreateNativeScreeninstances for all available native screens. The default implementation of this method will invoke thecreateScreenmethod 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:
- a list with all native screens. This list is
never
null, but it can be empty.
-
getAcceleratedScreen
public AcceleratedScreen getAcceleratedScreen(int[] attributes) throws GLException, UnsatisfiedLinkError Gets the AcceleratedScreen for this platform- Parameters:
attributes- a sequence of pairs (GLAttibute, value)- Returns:
- an AcceleratedScreen for rendering using OpenGL
- Throws:
GLException- if no OpenGL surface could be createdUnsatisfiedLinkError- if native graphics libraries could not be loaded for this platform.
-
logSelectedCursor
protected com.sun.glass.ui.monocle.NativeCursor logSelectedCursor(com.sun.glass.ui.monocle.NativeCursor cursor) Log the name of the supplied native cursor class if required.- Parameters:
cursor- the native cursor in use, null is permitted- Returns:
- the passed in cursor
-