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

public abstract Class NativePlatformFactory

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.glass.ui.monocle.OMAPPlatformFactory, com.sun.glass.ui.monocle.VNCPlatformFactory, com.sun.glass.ui.monocle.X11PlatformFactory, com.sun.glass.ui.monocle.AndroidPlatformFactory, com.sun.glass.ui.monocle.DispmanPlatformFactory, com.sun.glass.ui.monocle.EGLPlatformFactory, com.sun.glass.ui.monocle.EPDPlatformFactory, com.sun.glass.ui.monocle.HeadlessPlatformFactory, com.sun.glass.ui.monocle.LinuxPlatformFactory, com.sun.glass.ui.monocle.MX6PlatformFactory

Abstract factory class to instantiate a NativePlatform

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static NativePlatform

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected abstract NativePlatform

Returns:

a new NativePlatform.
createNativePlatform
()

Creates a NativePlatform.

protected abstract int

Returns:

the major version supported
getMajorVersion
()

Queries the major version number supported by this NativePlatformFactory.

protected abstract int

Returns:

the minor version supported
getMinorVersion
()

Queries the minor version number supported by this NativePlatformFactory.

public static synchronized NativePlatform

Returns:

a new NativePlatform
getNativePlatform
()

Obtains a NativePlatform that matches the platform on which we are running.

protected abstract boolean

Returns:

true if we can run on this platform.
matches
()

Checks whether this NativePlatformFactory can work with the platform on which we are running

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

majorVersionback to summary
private static final int majorVersion
minorVersionback to summary
private static final int minorVersion
platformback to summary
private static NativePlatform platform

Constructor Detail

NativePlatformFactoryback to summary
public NativePlatformFactory()

Method Detail

createNativePlatformback to summary
protected abstract NativePlatform createNativePlatform()

Creates a NativePlatform. This is only called if matches() was previously called and returned true.

Returns:NativePlatform

a new NativePlatform.

getMajorVersionback to summary
protected abstract int getMajorVersion()

Queries the major version number supported by this NativePlatformFactory.

Returns:int

the major version supported

getMinorVersionback to summary
protected abstract int getMinorVersion()

Queries the minor version number supported by this NativePlatformFactory.

Returns:int

the minor version supported

getNativePlatformback to summary
public static synchronized NativePlatform getNativePlatform()

Obtains a NativePlatform that matches the platform on which we are running. The system property monocle.platform defines a series of cascading fallbacks for what NativePlatform types to attempt to create. monocle .platform can be overridden to select a specific platform. For example, running with -Dmonocle.platform=Dispman, Linux selects the NativePlatform that works with the dispmanx libraries on the Raspberry Pi, but falls back to a generic software-rendered Linux framebuffer implementation if we are not running on a device with dispmanx libraries.

Returns:NativePlatform

a new NativePlatform

matchesback to summary
protected abstract boolean matches()

Checks whether this NativePlatformFactory can work with the platform on which we are running

Returns:boolean

true if we can run on this platform.