Class JmeCursor

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

public class JmeCursor extends Object
A Jme representation of the LWJGL Cursor class. Created Jun 6, 2012 12:12:38 PM
  • Constructor Details

    • JmeCursor

      public JmeCursor()
  • Method Details

    • 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 IntBuffer getImagesData()
      Queries the cursor's images' data.
      Returns:
      An IntBuffer containing the cursor's image(s) data in sequence.
    • getImagesDelay

      public 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(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(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 - the desired delay amount for each frame
    • 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.