public class AWTMouseInput extends AWTInput implements MouseInput, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener
MouseInput
dedicated to AWT component
.
This class is based on the JavaFX original code provided by Alexander Brui (see JME3-FX)
application, component, context, EXECUTOR, initialized, listener
AXIS_WHEEL, AXIS_X, AXIS_Y, BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT
Constructor and Description |
---|
AWTMouseInput(AWTContext context) |
Modifier and Type | Method and Description |
---|---|
void |
bind(java.awt.Component component) |
int |
getButtonCount()
Returns the number of buttons the mouse has.
|
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e) |
void |
setCursorVisible(boolean visible)
Set whether the mouse cursor should be visible or not.
|
void |
setNativeCursor(JmeCursor cursor)
Sets the cursor to use.
|
void |
unbind() |
protected void |
updateImpl() |
destroy, getInputTimeNanos, initialize, initializeImpl, isInitialized, setInputListener, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, getInputTimeNanos, initialize, isInitialized, setInputListener, update
public AWTMouseInput(AWTContext context)
protected void updateImpl()
updateImpl
in class AWTInput
public void setCursorVisible(boolean visible)
MouseInput
setCursorVisible
in interface MouseInput
visible
- Whether the mouse cursor should be visible or not.public int getButtonCount()
MouseInput
getButtonCount
in interface MouseInput
public void setNativeCursor(JmeCursor cursor)
MouseInput
setNativeCursor
in interface MouseInput
cursor
- The cursor to use.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener