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

pack-priv Class SoftwareCursor

extends NativeCursor
Class Inheritance
Imports
com.sun.glass.ui.Size, java.nio.Buffer, .ByteBuffer, .ByteOrder

Provides an implementation of NativeCursor that overlays a cursor image on top of a software-rendered framebuffer.

Field Summary

Modifier and TypeField and Description
private ByteBuffer
private int
private int
private int
private int
Inherited from com.sun.glass.ui.monocle.NativeCursor:
isVisible

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv Size
getBestSize()

Implements abstract com.sun.glass.ui.monocle.NativeCursor.getBestSize.

Returns the preferred size of a native cursor.

pack-priv Buffer
pack-priv int
pack-priv int
pack-priv void
setHotSpot(int
the X offset of the hot spot
hotspotX
,
int
the Y offset of the hot spot.
hotspotY
)

Implements abstract com.sun.glass.ui.monocle.NativeCursor.setHotSpot.

Sets the offset of the cursor's hot spot within the cursor image The hot spot offsets default to 0, 0.

pack-priv void
setImage(byte[]
the cursor image, in BYTE_BGRA_PRE format
cursorImage
)

Implements abstract com.sun.glass.ui.monocle.NativeCursor.setImage.

Sets the cursor image

pack-priv void
setLocation(int
the new X location on the screen
x
,
int
the new Y location on the screen
y
)

Implements abstract com.sun.glass.ui.monocle.NativeCursor.setLocation.

Sets the location of the hot spot of the cursor on the screen

pack-priv void
setVisibility(boolean
the new setting for the cursor's visibility.
visibility
)

Implements abstract com.sun.glass.ui.monocle.NativeCursor.setVisibility.

Sets whether or not the cursor is visible.

pack-priv void
shutdown()

Implements abstract com.sun.glass.ui.monocle.NativeCursor.shutdown.

Performs any necessary shutdown of the cursor infrastructure.

Inherited from com.sun.glass.ui.monocle.NativeCursor:
getVisiblity

Field Detail

cursorBufferback to summary
private ByteBuffer cursorBuffer
hotspotXback to summary
private int hotspotX
hotspotYback to summary
private int hotspotY
renderXback to summary
private int renderX
renderYback to summary
private int renderY

Constructor Detail

SoftwareCursorback to summary
pack-priv SoftwareCursor()

Method Detail

getBestSizeback to summary
pack-priv Size getBestSize()

Implements abstract com.sun.glass.ui.monocle.NativeCursor.getBestSize.

Doc from com.sun.glass.ui.monocle.NativeCursor.getBestSize.

Returns the preferred size of a native cursor.

Annotations
@Override
getCursorBufferback to summary
pack-priv Buffer getCursorBuffer()
getRenderXback to summary
pack-priv int getRenderX()
getRenderYback to summary
pack-priv int getRenderY()
setHotSpotback to summary
pack-priv void setHotSpot(int hotspotX, int hotspotY)

Implements abstract com.sun.glass.ui.monocle.NativeCursor.setHotSpot.

Doc from com.sun.glass.ui.monocle.NativeCursor.setHotSpot.

Sets the offset of the cursor's hot spot within the cursor image The hot spot offsets default to 0, 0.

Parameters
hotspotX:int

the X offset of the hot spot

hotspotY:int

the Y offset of the hot spot.

Annotations
@Override
setImageback to summary
pack-priv void setImage(byte[] cursorImage)

Implements abstract com.sun.glass.ui.monocle.NativeCursor.setImage.

Doc from com.sun.glass.ui.monocle.NativeCursor.setImage.

Sets the cursor image

Parameters
cursorImage:byte[]

the cursor image, in BYTE_BGRA_PRE format

Annotations
@Override
setLocationback to summary
pack-priv void setLocation(int x, int y)

Implements abstract com.sun.glass.ui.monocle.NativeCursor.setLocation.

Doc from com.sun.glass.ui.monocle.NativeCursor.setLocation.

Sets the location of the hot spot of the cursor on the screen

Parameters
x:int

the new X location on the screen

y:int

the new Y location on the screen

Annotations
@Override
setVisibilityback to summary
pack-priv void setVisibility(boolean visibility)

Implements abstract com.sun.glass.ui.monocle.NativeCursor.setVisibility.

Doc from com.sun.glass.ui.monocle.NativeCursor.setVisibility.

Sets whether or not the cursor is visible. The implementation should set the isVisible field. On success the isVisible field is set to the visibility parameter.

Parameters
visibility:boolean

the new setting for the cursor's visibility.

Annotations
@Override
shutdownback to summary
pack-priv void shutdown()

Implements abstract com.sun.glass.ui.monocle.NativeCursor.shutdown.

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

Performs any necessary shutdown of the cursor infrastructure. Called only once.

Annotations
@Override