public class AwtMouseInput extends java.lang.Object implements MouseInput, java.awt.event.MouseListener, java.awt.event.MouseWheelListener, java.awt.event.MouseMotionListener
AwtMouseInput| 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 |
|---|
AwtMouseInput() |
| 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(java.awt.event.MouseEvent awtEvt) |
void |
mouseDragged(java.awt.event.MouseEvent awtEvt) |
void |
mouseEntered(java.awt.event.MouseEvent awtEvt) |
void |
mouseExited(java.awt.event.MouseEvent awtEvt) |
void |
mouseMoved(java.awt.event.MouseEvent awtEvt) |
void |
mousePressed(java.awt.event.MouseEvent awtEvt) |
void |
mouseReleased(java.awt.event.MouseEvent awtEvt) |
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent 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(java.awt.Component comp) |
void |
setNativeCursor(JmeCursor cursor)
Sets the cursor to use.
|
void |
update()
Queries the device for input.
|
public void setInputSource(java.awt.Component 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(java.awt.event.MouseEvent awtEvt)
mouseClicked in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent awtEvt)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent awtEvt)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent awtEvt)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent awtEvt)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseWheelMoved(java.awt.event.MouseWheelEvent awtEvt)
mouseWheelMoved in interface java.awt.event.MouseWheelListenerpublic void mouseDragged(java.awt.event.MouseEvent awtEvt)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent awtEvt)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void setNativeCursor(JmeCursor cursor)
MouseInputsetNativeCursor in interface MouseInputcursor - The cursor to use.