com.jme3.cursors.plugins
Class JmeCursor

java.lang.Object
  extended by com.jme3.cursors.plugins.JmeCursor

public class JmeCursor
extends java.lang.Object

A Jme representation of the LWJGL Cursor class.


Constructor Summary
JmeCursor()
           
 
Method Summary
 int getHeight()
          Queries the cursor's height.
 java.nio.IntBuffer getImagesData()
          Queries the cursor's images' data.
 java.nio.IntBuffer getImagesDelay()
          Queries the cursor's delay for each frame.
 int getNumImages()
          Queries the number of images contained in the cursor.
 int getWidth()
          Queries the cursor's width.
 int getXHotSpot()
          Queries the cursor's X hotspot coordinate.
 int getYHotSpot()
          Queries the cursor's Y hotspot coordinate.
 void setHeight(int height)
          Sets the cursor's height.
 void setImagesData(java.nio.IntBuffer imagesData)
          Sets the cursor's image(s) data.
 void setImagesDelay(java.nio.IntBuffer imagesDelay)
          Sets the cursor image delay for each frame of an animated cursor.
 void setNumImages(int numImages)
          Sets the number of images in the cursor.
 void setWidth(int width)
          Sets the cursor's width.
 void setxHotSpot(int xHotSpot)
          Sets the cursor's X coordinate for its hotspot.
 void setyHotSpot(int yHotSpot)
          Sets the cursor's Y axis coordinate for its hotspot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmeCursor

public JmeCursor()
Method Detail

getHeight

public int getHeight()
Queries the cursor's height. Note that the coordinate system is the same as OpenGL. 0, 0 being lower left.

Returns:
the height in pixel.

getImagesData

public java.nio.IntBuffer getImagesData()
Queries the cursor's images' data.

Returns:
An IntBuffer containing the cursor's image(s) data in sequence.

getImagesDelay

public java.nio.IntBuffer getImagesDelay()
Queries the cursor's delay for each frame.

Returns:
An IntBuffer containing the cursor's delay in sequence. The delay is expressed in milliseconds.

getNumImages

public int getNumImages()
Queries the number of images contained in the cursor. Static cursors should contain only 1 image.

Returns:
The number of image(s) composing the cursor. 1 if the cursor is static.

getWidth

public int getWidth()
Queries the cursor's width. Note that the coordinate system is the same as OpenGL. 0, 0 being lower left.

Returns:
the width of the cursor in pixel.

getXHotSpot

public int getXHotSpot()
Queries the cursor's X hotspot coordinate. Note that the coordinate system is the same as OpenGL. 0, 0 being lower left.

Returns:
the coordinate on the cursor's X axis where the hotspot is located.

getYHotSpot

public int getYHotSpot()
Queries the cursor's Y hotspot coordinate. Note that the coordinate system is the same as OpenGL. 0, 0 being lower left.

Returns:
the coordinate on the cursor's Y axis where the hotspot is located.

setHeight

public void setHeight(int height)
Sets the cursor's height.

Parameters:
height - The height of the cursor in pixels. Note that all images in a cursor have to be the same size.

setImagesData

public void setImagesData(java.nio.IntBuffer imagesData)
Sets the cursor's image(s) data. Each image data should be consecutively stored in the IntBuffer if more tha one image is contained in the cursor.

Parameters:
imagesData - the cursor's image(s) data. Each image data should be consecutively stored in the IntBuffer if more than one image is contained in the cursor.

setImagesDelay

public void setImagesDelay(java.nio.IntBuffer imagesDelay)
Sets the cursor image delay for each frame of an animated cursor. If the cursor has no animation and consist of only 1 image, null is expected.

Parameters:
imagesDelay -

setNumImages

public void setNumImages(int numImages)
Sets the number of images in the cursor.

Parameters:
numImages - number of images in the cursor.

setWidth

public void setWidth(int width)
Sets the cursor's width.

Parameters:
width - The width of the cursor in pixels. Note that all images in a cursor have to be the same size.

setxHotSpot

public void setxHotSpot(int xHotSpot)
Sets the cursor's X coordinate for its hotspot.

Parameters:
xHotSpot - the cursor's X axis coordinate for its hotspot. Note that the coordinate system is the same as OpenGL. 0, 0 being lower left.

setyHotSpot

public void setyHotSpot(int yHotSpot)
Sets the cursor's Y axis coordinate for its hotspot.

Parameters:
yHotSpot - the cursor's Y axis coordinate for its hotspot. Note that the coordinate system is the same as OpenGL. 0, 0 being lower left.