public class NewtMouseInput extends java.lang.Object implements MouseInput, com.jogamp.newt.event.MouseListener
| Modifier and Type | Field and Description |
|---|---|
static int |
WHEEL_AMP |
AXIS_WHEEL, AXIS_X, AXIS_Y, BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT| Constructor and Description |
|---|
NewtMouseInput() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Ceases listening to events from the device.
|
int |
getButtonCount()
Returns the number of buttons the mouse has.
|
long |
getInputTimeNanos() |
void |
initialize()
Initializes the native side to listen into events from the device.
|
boolean |
isInitialized() |
void |
mouseClicked(com.jogamp.newt.event.MouseEvent awtEvt) |
void |
mouseDragged(com.jogamp.newt.event.MouseEvent awtEvt) |
void |
mouseEntered(com.jogamp.newt.event.MouseEvent awtEvt) |
void |
mouseExited(com.jogamp.newt.event.MouseEvent awtEvt) |
void |
mouseMoved(com.jogamp.newt.event.MouseEvent awtEvt) |
void |
mousePressed(com.jogamp.newt.event.MouseEvent newtEvt) |
void |
mouseReleased(com.jogamp.newt.event.MouseEvent awtEvt) |
void |
mouseWheelMoved(com.jogamp.newt.event.MouseEvent awtEvt) |
void |
setCursorVisible(boolean visible)
Set whether the mouse cursor should be visible or not.
|
void |
setInputListener(RawInputListener listener)
Sets the input listener to receive events from this device.
|
void |
setInputSource(com.jogamp.newt.opengl.GLWindow comp) |
void |
setNativeCursor(JmeCursor cursor)
Sets the cursor to use.
|
void |
update()
Queries the device for input.
|
public void setInputSource(com.jogamp.newt.opengl.GLWindow comp)
public void initialize()
Inputinitialize in interface Inputpublic void destroy()
Inputpublic boolean isInitialized()
isInitialized in interface InputInput.initialize(),
Input.destroy()public void setInputListener(RawInputListener listener)
InputsetInputListener in interface Inputpublic long getInputTimeNanos()
getInputTimeNanos in interface Inputpublic void setCursorVisible(boolean visible)
MouseInputsetCursorVisible in interface MouseInputvisible - Whether the mouse cursor should be visible or not.public void update()
Inputupdate in interface InputInput.setInputListener(com.jme3.input.RawInputListener)public int getButtonCount()
MouseInputgetButtonCount in interface MouseInputpublic void mouseClicked(com.jogamp.newt.event.MouseEvent awtEvt)
mouseClicked in interface com.jogamp.newt.event.MouseListenerpublic void mousePressed(com.jogamp.newt.event.MouseEvent newtEvt)
mousePressed in interface com.jogamp.newt.event.MouseListenerpublic void mouseReleased(com.jogamp.newt.event.MouseEvent awtEvt)
mouseReleased in interface com.jogamp.newt.event.MouseListenerpublic void mouseEntered(com.jogamp.newt.event.MouseEvent awtEvt)
mouseEntered in interface com.jogamp.newt.event.MouseListenerpublic void mouseExited(com.jogamp.newt.event.MouseEvent awtEvt)
mouseExited in interface com.jogamp.newt.event.MouseListenerpublic void mouseWheelMoved(com.jogamp.newt.event.MouseEvent awtEvt)
mouseWheelMoved in interface com.jogamp.newt.event.MouseListenerpublic void mouseDragged(com.jogamp.newt.event.MouseEvent awtEvt)
mouseDragged in interface com.jogamp.newt.event.MouseListenerpublic void mouseMoved(com.jogamp.newt.event.MouseEvent awtEvt)
mouseMoved in interface com.jogamp.newt.event.MouseListenerpublic void setNativeCursor(JmeCursor cursor)
MouseInputsetNativeCursor in interface MouseInputcursor - The cursor to use.