com.jme.input.mouse
Class TriggersMouseInputListener
java.lang.Object
com.jme.input.mouse.TriggersMouseInputListener
- All Implemented Interfaces:
- MouseInputListener
class TriggersMouseInputListener
- extends java.lang.Object
- implements MouseInputListener
Each MouseInputHandlerDevice
has an instance of this class which is subscribed at the
MouseInput
to receive mouse events and forward them to the mouse triggers.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DO_CLAMP
public static final boolean DO_CLAMP
- See Also:
- Constant Field Values
TriggersMouseInputListener
public TriggersMouseInputListener()
activate
public void activate()
isActivated
public boolean isActivated()
deactivate
public void deactivate()
onButton
public void onButton(int button,
boolean pressed,
int x,
int y)
- Description copied from interface:
MouseInputListener
- Called in
KeyInput.update()
whenever a mouse button is pressed or released.
- Specified by:
onButton
in interface MouseInputListener
- Parameters:
button
- index of the mouse button that was pressed/releasedpressed
- true if button was pressed, false if releasedx
- x position of the mouse while button was pressed/releasedy
- y position of the mouse while button was pressed/released
onWheel
public void onWheel(int wheelDelta,
int x,
int y)
- Description copied from interface:
MouseInputListener
- Called in
KeyInput.update()
whenever the mouse wheel is rotated.
- Specified by:
onWheel
in interface MouseInputListener
- Parameters:
wheelDelta
- steps the wheel was rotatedx
- x position of the mouse while wheel was rotatedy
- y position of the mouse while wheel was rotated
onMove
public void onMove(int xDelta,
int yDelta,
int newX,
int newY)
- Description copied from interface:
MouseInputListener
- Called in
KeyInput.update()
whenever the mouse is moved.
- Specified by:
onMove
in interface MouseInputListener
- Parameters:
xDelta
- delta of the x coordinate since the last mouse movement eventyDelta
- delta of the y coordinate since the last mouse movement eventnewX
- x position of the mouse after the mouse was movednewY
- y position of the mouse after the mouse was moved
add
void add(MouseInputHandlerDevice.MouseButtonTrigger trigger)
remove
void remove(MouseInputHandlerDevice.MouseButtonTrigger trigger)
add
void add(MouseInputHandlerDevice.MouseAxisTrigger trigger)
remove
void remove(MouseInputHandlerDevice.MouseAxisTrigger trigger)