Class NativePlatform

java.lang.Object
com.sun.glass.ui.monocle.NativePlatform
Direct Known Subclasses:
EGLPlatform

public abstract class NativePlatform extends Object
Abstract of a platform on which JavaFX can run.
  • Field Details

  • 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

      protected abstract NativeScreen createScreen()
      Creates the NativeScreen for this platform. Called once.
      Returns:
      a new NativeScreen
    • createScreens

      protected 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:
      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 created
      UnsatisfiedLinkError - 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