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

pack-priv Class HeadlessScreen

extends Object
implements NativeScreen
Class Inheritance
All Implemented Interfaces
com.sun.glass.ui.monocle.NativeScreen
Known Direct Subclasses
com.sun.glass.ui.monocle.VNCScreen
Imports
com.sun.glass.ui.Pixels, java.nio.Buffer, .ByteBuffer, .ByteOrder

Field Summary

Modifier and TypeField and Description
protected int
protected Framebuffer
protected int
protected int

Constructor Summary

AccessConstructor and Description
pack-priv
protected
HeadlessScreen(int defaultWidth, int defaultHeight, int defaultDepth)

Method Summary

Modifier and TypeMethod and Description
public int
getDepth()

Implements com.sun.glass.ui.monocle.NativeScreen.getDepth.

Returns the bit depth of the screen/

public int
getDPI()

Implements com.sun.glass.ui.monocle.NativeScreen.getDPI.

Returns the number of pixels per inch in the screen.

public int
getHeight()

Implements com.sun.glass.ui.monocle.NativeScreen.getHeight.

Returns the pixel height of the screen.

public int
getNativeFormat()

Implements com.sun.glass.ui.monocle.NativeScreen.getNativeFormat.

Returns the native format of the screen, as a constant from the Pixels class.

public long
getNativeHandle()

Implements com.sun.glass.ui.monocle.NativeScreen.getNativeHandle.

Returns a native handle for the screen.

public float
getScale()

Implements com.sun.glass.ui.monocle.NativeScreen.getScale.

Return the scale factor between the physical pixels and the logical pixels e.g. hdpi = 1.5, xhdpi = 2.0

public ByteBuffer
getScreenCapture()

Implements com.sun.glass.ui.monocle.NativeScreen.getScreenCapture.

Returns a read-only ByteBuffer in the native pixel format containing the screen contents.

public int
getWidth()

Implements com.sun.glass.ui.monocle.NativeScreen.getWidth.

Returns the pixel width of the screen.

public void
shutdown()

Implements com.sun.glass.ui.monocle.NativeScreen.shutdown.

Called during JavaFX shutdown to release the screen.

public void
swapBuffers()

Implements com.sun.glass.ui.monocle.NativeScreen.swapBuffers.

Called on the JavaFX application thread when pixel data for all windows has been uploaded.

public void
uploadPixels(Buffer
Pixel data, in BYTE_BGRA_PRE format. The byte stride of the data is equal to width * 4.
b
,
int
The X offset of the pixel data on the screen
x
,
int
The Y offset of the pixel data on the screen
y
,
int
The pixel width of the data
width
,
int
The pixel height of the data
height
,
float
The alpha level to use to compose the data over existing pixels
alpha
)

Implements com.sun.glass.ui.monocle.NativeScreen.uploadPixels.

Uploads a pixel buffer to the screen.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

depthback to summary
protected int depth
fbback to summary
protected Framebuffer fb
heightback to summary
protected int height
widthback to summary
protected int width

Constructor Detail

HeadlessScreenback to summary
pack-priv HeadlessScreen()
HeadlessScreenback to summary
protected HeadlessScreen(int defaultWidth, int defaultHeight, int defaultDepth)

Method Detail

getDepthback to summary
public int getDepth()

Implements com.sun.glass.ui.monocle.NativeScreen.getDepth.

Doc from com.sun.glass.ui.monocle.NativeScreen.getDepth.

Returns the bit depth of the screen/

Annotations
@Override
getDPIback to summary
public int getDPI()

Implements com.sun.glass.ui.monocle.NativeScreen.getDPI.

Doc from com.sun.glass.ui.monocle.NativeScreen.getDPI.

Returns the number of pixels per inch in the screen.

Annotations
@Override
getHeightback to summary
public int getHeight()

Implements com.sun.glass.ui.monocle.NativeScreen.getHeight.

Doc from com.sun.glass.ui.monocle.NativeScreen.getHeight.

Returns the pixel height of the screen.

Annotations
@Override
getNativeFormatback to summary
public int getNativeFormat()

Implements com.sun.glass.ui.monocle.NativeScreen.getNativeFormat.

Doc from com.sun.glass.ui.monocle.NativeScreen.getNativeFormat.

Returns the native format of the screen, as a constant from the Pixels class.

Annotations
@Override
getNativeHandleback to summary
public long getNativeHandle()

Implements com.sun.glass.ui.monocle.NativeScreen.getNativeHandle.

Doc from com.sun.glass.ui.monocle.NativeScreen.getNativeHandle.

Returns a native handle for the screen. The handle is platform-specific.

Annotations
@Override
getScaleback to summary
public float getScale()

Implements com.sun.glass.ui.monocle.NativeScreen.getScale.

Doc from com.sun.glass.ui.monocle.NativeScreen.getScale.

Return the scale factor between the physical pixels and the logical pixels e.g. hdpi = 1.5, xhdpi = 2.0

Annotations
@Override
getScreenCaptureback to summary
public ByteBuffer getScreenCapture()

Implements com.sun.glass.ui.monocle.NativeScreen.getScreenCapture.

Doc from com.sun.glass.ui.monocle.NativeScreen.getScreenCapture.

Returns a read-only ByteBuffer in the native pixel format containing the screen contents.

Returns:ByteBuffer

ByteBuffer a read-only ByteBuffer containing the screen contents

Annotations
@Override
getWidthback to summary
public int getWidth()

Implements com.sun.glass.ui.monocle.NativeScreen.getWidth.

Doc from com.sun.glass.ui.monocle.NativeScreen.getWidth.

Returns the pixel width of the screen.

Annotations
@Override
shutdownback to summary
public void shutdown()

Implements com.sun.glass.ui.monocle.NativeScreen.shutdown.

Doc from com.sun.glass.ui.monocle.NativeScreen.shutdown.

Called during JavaFX shutdown to release the screen. Called only once.

Annotations
@Override
swapBuffersback to summary
public void swapBuffers()

Implements com.sun.glass.ui.monocle.NativeScreen.swapBuffers.

Doc from com.sun.glass.ui.monocle.NativeScreen.swapBuffers.

Called on the JavaFX application thread when pixel data for all windows has been uploaded.

Annotations
@Override
uploadPixelsback to summary
public void uploadPixels(Buffer b, int x, int y, int width, int height, float alpha)

Implements com.sun.glass.ui.monocle.NativeScreen.uploadPixels.

Doc from com.sun.glass.ui.monocle.NativeScreen.uploadPixels.

Uploads a pixel buffer to the screen. Called on the JavaFX application thread.

Parameters
b:Buffer

Pixel data, in BYTE_BGRA_PRE format. The byte stride of the data is equal to width * 4.

x:int

The X offset of the pixel data on the screen

y:int

The Y offset of the pixel data on the screen

width:int

The pixel width of the data

height:int

The pixel height of the data

alpha:float

The alpha level to use to compose the data over existing pixels

Annotations
@Override