|
||||||||||
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 MouseInput
MouseInput.destroy()
public int getButtonIndex(java.lang.String buttonName)
getButtonIndex
returns the index of a given button name.
getButtonIndex
in class MouseInput
buttonName
- 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 MouseInput
buttonIndex
- 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 MouseInput
buttonCode
- the button code to check.
MouseInput.isButtonDown(int)
public int getWheelDelta()
getWheelDelta
retrieves the change of the mouse wheel,
if any.
getWheelDelta
in class MouseInput
MouseInput.getWheelDelta()
public int getXDelta()
getXDelta
retrieves the change of the x position, if any.
getXDelta
in class MouseInput
MouseInput.getXDelta()
public int getYDelta()
getYDelta
retrieves the change of the y position, if any.
getYDelta
in class MouseInput
MouseInput.getYDelta()
public int getXAbsolute()
getXAbsolute
gets the absolute x axis value.
getXAbsolute
in class MouseInput
MouseInput.getXAbsolute()
public int getYAbsolute()
getYAbsolute
gets the absolute y axis value.
getYAbsolute
in class MouseInput
MouseInput.getYAbsolute()
public void update()
updateState
updates the mouse state.
update
in class MouseInput
MouseInput.update()
public void setCursorVisible(boolean v)
setCursorVisible
sets the visiblity of the hardware
cursor.
setCursorVisible
in class MouseInput
v
- 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 MouseInput
MouseInput.isCursorVisible()
public void setHardwareCursor(java.net.URL file)
MouseInput
setHardwareCursor
sets the image to use for the hardware cursor.
setHardwareCursor
in class MouseInput
file
- URL to cursor imagepublic void setHardwareCursor(java.net.URL file, int xHotspot, int yHotspot)
setHardwareCursor
in class MouseInput
url
- to imagefilexHotspot
- from image leftyHotspot
- from image bottompublic void setHardwareCursor(java.net.URL file, Image[] images, int[] delays, int xHotspot, int yHotspot)
setHardwareCursor
in class MouseInput
file
- 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 MouseInput
public int getButtonCount()
getButtonCount
in class MouseInput
public void setCursorPosition(int x, int y)
setCursorPosition
in class MouseInput
public void clear()
clear
in class MouseInput
public void clearButton(int buttonCode)
clearButton
in class MouseInput
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |