|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.input.Input
com.jme.input.MouseInput
com.jme.input.lwjgl.LWJGLMouseInput
public class LWJGLMouseInput
Mouse input handler that uses the LWJGL input API.
Cursor,
Mouse| Field Summary |
|---|
| Fields inherited from class com.jme.input.MouseInput |
|---|
INPUT_AWT, INPUT_LWJGL, listeners |
| Constructor Summary | |
|---|---|
protected |
LWJGLMouseInput()
Constructor creates a new LWJGLMouseInput object. |
| Method Summary | |
|---|---|
void |
clear()
|
void |
clearButton(int buttonCode)
|
void |
destroy()
destroy cleans up the native mouse reference. |
int |
getButtonCount()
|
int |
getButtonIndex(java.lang.String buttonName)
getButtonIndex returns the index of a given button name. |
java.lang.String |
getButtonName(int buttonIndex)
getButtonName returns the name of a given button index. |
int |
getWheelDelta()
getWheelDelta retrieves the change of the mouse wheel,
if any. |
int |
getWheelRotation()
|
int |
getXAbsolute()
getXAbsolute gets the absolute x axis value. |
int |
getXDelta()
getXDelta retrieves the change of the x position, if any. |
int |
getYAbsolute()
getYAbsolute gets the absolute y axis value. |
int |
getYDelta()
getYDelta retrieves the change of the y position, if any. |
boolean |
isButtonDown(int buttonCode)
isButtonDown tests if a given button is pressed or not. |
boolean |
isCursorVisible()
isCursorVisible Returns true if a cursor is currently bound. |
void |
setCursorPosition(int x,
int y)
|
void |
setCursorVisible(boolean v)
setCursorVisible sets the visiblity of the hardware
cursor. |
void |
setHardwareCursor(java.net.URL file)
setHardwareCursor sets the image to use for the hardware cursor. |
void |
setHardwareCursor(java.net.URL file,
Image[] images,
int[] delays,
int xHotspot,
int yHotspot)
This method will set an animated harware cursor. |
void |
setHardwareCursor(java.net.URL file,
int xHotspot,
int yHotspot)
Loads and sets a hardware cursor |
void |
update()
updateState updates the mouse state. |
| Methods inherited from class com.jme.input.MouseInput |
|---|
addListener, containsListener, destroyIfInitalized, get, getListeners, getProvider, isInited, removeListener, removeListeners, setProvider, setProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected LWJGLMouseInput()
LWJGLMouseInput object. A call
to the LWJGL creation method is made, if any problems occur during
this creation, it is logged.
| Method Detail |
|---|
public void destroy()
destroy cleans up the native mouse reference.
destroy in class MouseInputMouseInput.destroy()public int getButtonIndex(java.lang.String buttonName)
getButtonIndex returns the index of a given button name.
getButtonIndex in class MouseInputbuttonName - the name to get the code for.
MouseInput.getButtonIndex(java.lang.String)public java.lang.String getButtonName(int buttonIndex)
getButtonName returns the name of a given button index.
getButtonName in class MouseInputbuttonIndex - the code to get the name for.
MouseInput.getButtonName(int)public boolean isButtonDown(int buttonCode)
isButtonDown tests if a given button is pressed or not.
isButtonDown in class MouseInputbuttonCode - the button code to check.
MouseInput.isButtonDown(int)public int getWheelDelta()
getWheelDelta retrieves the change of the mouse wheel,
if any.
getWheelDelta in class MouseInputMouseInput.getWheelDelta()public int getXDelta()
getXDelta retrieves the change of the x position, if any.
getXDelta in class MouseInputMouseInput.getXDelta()public int getYDelta()
getYDelta retrieves the change of the y position, if any.
getYDelta in class MouseInputMouseInput.getYDelta()public int getXAbsolute()
getXAbsolute gets the absolute x axis value.
getXAbsolute in class MouseInputMouseInput.getXAbsolute()public int getYAbsolute()
getYAbsolute gets the absolute y axis value.
getYAbsolute in class MouseInputMouseInput.getYAbsolute()public void update()
updateState updates the mouse state.
update in class MouseInputMouseInput.update()public void setCursorVisible(boolean v)
setCursorVisible sets the visiblity of the hardware
cursor.
setCursorVisible in class MouseInputv - true turns the cursor on false turns it offMouseInput.setCursorVisible(boolean)public boolean isCursorVisible()
isCursorVisible Returns true if a cursor is currently bound.
isCursorVisible in class MouseInputMouseInput.isCursorVisible()public void setHardwareCursor(java.net.URL file)
MouseInputsetHardwareCursor sets the image to use for the hardware cursor.
setHardwareCursor in class MouseInputfile - URL to cursor image
public void setHardwareCursor(java.net.URL file,
int xHotspot,
int yHotspot)
setHardwareCursor in class MouseInputurl - to imagefilexHotspot - from image leftyHotspot - from image bottom
public void setHardwareCursor(java.net.URL file,
Image[] images,
int[] delays,
int xHotspot,
int yHotspot)
setHardwareCursor in class MouseInputfile - in this method file is only used as a key for cursor cashingimages - the animation framesdelays - delays between changing each framexHotspot - from image leftyHotspot - from image bottompublic int getWheelRotation()
getWheelRotation in class MouseInputpublic int getButtonCount()
getButtonCount in class MouseInput
public void setCursorPosition(int x,
int y)
setCursorPosition in class MouseInputpublic void clear()
clear in class MouseInputpublic void clearButton(int buttonCode)
clearButton in class MouseInput
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||