Package com.jme3.input
Class AWTMouseInput
java.lang.Object
com.jme3.input.AWTInput
com.jme3.input.AWTMouseInput
- All Implemented Interfaces:
Input
,MouseInput
,MouseListener
,MouseMotionListener
,MouseWheelListener
,EventListener
public class AWTMouseInput
extends AWTInput
implements MouseInput, MouseListener, MouseMotionListener, MouseWheelListener
The implementation of the
MouseInput
dedicated to AWT component
.
This class is based on the JavaFX original code provided by Alexander Brui (see JME3-FX)
-
Field Summary
Fields inherited from class com.jme3.input.AWTInput
application, component, context, EXECUTOR, initialized, listener
Fields inherited from interface com.jme3.input.MouseInput
AXIS_WHEEL, AXIS_X, AXIS_Y, BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
int
Returns the number of buttons the mouse has.void
void
void
void
void
void
void
void
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
Methods inherited from class com.jme3.input.AWTInput
destroy, getInputTimeNanos, initialize, initializeImpl, isInitialized, setInputListener, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jme3.input.Input
destroy, getInputTimeNanos, initialize, isInitialized, setInputListener, update
-
Constructor Details
-
AWTMouseInput
-
-
Method Details
-
bind
-
unbind
public void unbind() -
updateImpl
protected void updateImpl()- Overrides:
updateImpl
in classAWTInput
-
setCursorVisible
public void setCursorVisible(boolean visible) Description copied from interface:MouseInput
Set whether the mouse cursor should be visible or not.- Specified by:
setCursorVisible
in interfaceMouseInput
- Parameters:
visible
- Whether the mouse cursor should be visible or not.
-
getButtonCount
public int getButtonCount()Description copied from interface:MouseInput
Returns the number of buttons the mouse has. Typically 3 for most mice.- Specified by:
getButtonCount
in interfaceMouseInput
- Returns:
- the number of buttons the mouse has.
-
setNativeCursor
Description copied from interface:MouseInput
Sets the cursor to use.- Specified by:
setNativeCursor
in interfaceMouseInput
- Parameters:
cursor
- The cursor to use.
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-
mouseWheelMoved
- Specified by:
mouseWheelMoved
in interfaceMouseWheelListener
-