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()
Input
initialize
in interface Input
public void destroy()
Input
public boolean isInitialized()
isInitialized
in interface Input
Input.initialize()
,
Input.destroy()
public void setInputListener(RawInputListener listener)
Input
setInputListener
in interface Input
public long getInputTimeNanos()
getInputTimeNanos
in interface Input
public void setCursorVisible(boolean visible)
MouseInput
setCursorVisible
in interface MouseInput
visible
- Whether the mouse cursor should be visible or not.public void update()
Input
update
in interface Input
Input.setInputListener(com.jme3.input.RawInputListener)
public int getButtonCount()
MouseInput
getButtonCount
in interface MouseInput
public void mouseClicked(com.jogamp.newt.event.MouseEvent awtEvt)
mouseClicked
in interface com.jogamp.newt.event.MouseListener
public void mousePressed(com.jogamp.newt.event.MouseEvent newtEvt)
mousePressed
in interface com.jogamp.newt.event.MouseListener
public void mouseReleased(com.jogamp.newt.event.MouseEvent awtEvt)
mouseReleased
in interface com.jogamp.newt.event.MouseListener
public void mouseEntered(com.jogamp.newt.event.MouseEvent awtEvt)
mouseEntered
in interface com.jogamp.newt.event.MouseListener
public void mouseExited(com.jogamp.newt.event.MouseEvent awtEvt)
mouseExited
in interface com.jogamp.newt.event.MouseListener
public void mouseWheelMoved(com.jogamp.newt.event.MouseEvent awtEvt)
mouseWheelMoved
in interface com.jogamp.newt.event.MouseListener
public void mouseDragged(com.jogamp.newt.event.MouseEvent awtEvt)
mouseDragged
in interface com.jogamp.newt.event.MouseListener
public void mouseMoved(com.jogamp.newt.event.MouseEvent awtEvt)
mouseMoved
in interface com.jogamp.newt.event.MouseListener
public void setNativeCursor(JmeCursor cursor)
MouseInput
setNativeCursor
in interface MouseInput
cursor
- The cursor to use.