Package com.jme3.input.event
Class MouseButtonEvent
java.lang.Object
com.jme3.input.event.InputEvent
com.jme3.input.event.MouseButtonEvent
Mouse button press/release event.
- 
Field SummaryFields inherited from class com.jme3.input.event.InputEventconsumed, time
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the mouse button index.intgetX()The X coordinate of the mouse when the event was generated.intgetY()The Y coordinate of the mouse when the event was generated.booleanReturns true if the mouse button was pressed, false if it was released.booleanReturns true if the mouse button was released, false if it was pressed.toString()Methods inherited from class com.jme3.input.event.InputEventgetTime, isConsumed, setConsumed, setTime
- 
Constructor Details- 
MouseButtonEventpublic MouseButtonEvent(int btnIndex, boolean pressed, int x, int y) 
 
- 
- 
Method Details- 
getButtonIndexpublic int getButtonIndex()Returns the mouse button index.See constants in MouseInput.- Returns:
- the mouse button index.
 
- 
isPressedpublic boolean isPressed()Returns true if the mouse button was pressed, false if it was released.- Returns:
- true if the mouse button was pressed, false if it was released.
 
- 
isReleasedpublic boolean isReleased()Returns true if the mouse button was released, false if it was pressed.- Returns:
- true if the mouse button was released, false if it was pressed.
 
- 
getXpublic int getX()The X coordinate of the mouse when the event was generated.- Returns:
- X coordinate of the mouse when the event was generated.
 
- 
getYpublic int getY()The Y coordinate of the mouse when the event was generated.- Returns:
- Y coordinate of the mouse when the event was generated.
 
- 
toString
 
-