sun.porting.graphicssystem
Class CursorImage

java.lang.Object
  extended by sun.porting.graphicssystem.CursorImage

public abstract class CursorImage
extends Object

CursorImage is an object which encapsulates the bitmap and hotspot data describing a cursor. It is used simply to hold all of the required information in one place. It also enables the native implementation to build a cursor from this image data and cache it.


Field Summary
protected  int hotX
          The x coordinate of the cursor hot spot, i.e.
protected  int hotY
          The y coordinate of the cursor hot spot, i.e.
protected  java.awt.Image image
          An image which contains the shape of the cursor.
 
Constructor Summary
CursorImage(java.awt.Image imageData, int x, int y)
          Create a new CursorImage object from the given image data and hotspot.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

protected java.awt.Image image
An image which contains the shape of the cursor. Image transparency is used to determine which pixels of the cursor are painted and which are not. Colors in the image should be retained whenever possible (e.g. if the underlying graphics system supports colored cursors). At a minimum, three pixel values (black, white, transparent) should be significant.


hotX

protected int hotX
The x coordinate of the cursor hot spot, i.e. the coordinate within the image that corresponds to the cursor's location on screen.


hotY

protected int hotY
The y coordinate of the cursor hot spot, i.e. the coordinate within the image that corresponds to the cursor's location on screen.

Constructor Detail

CursorImage

public CursorImage(java.awt.Image imageData,
                   int x,
                   int y)
Create a new CursorImage object from the given image data and hotspot. It is the responsibility of the caller to make sure that the image data contains no more colors than are supported by the graphics system, and that the size of the cursor image is supported.

Parameters:
imageData - An image, probably with transparency, which describes the shape and coloration of the cursor.
x - The x coordinate of the cursor hotspot.
y - The y coordinate of the cursor hotspot.
See Also:
GraphicsSystem.getMaximumCursorColors(), GraphicsSystem.getMaximumCursorSize(), GraphicsSystem.getBestCursorSize(int, int)