Package com.openinventor.inventor.events
Class SoMouseButtonEvent
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.events.SoEvent
com.openinventor.inventor.events.SoButtonEvent
com.openinventor.inventor.events.SoMouseButtonEvent
Mouse button press and release events.
SoMouseButtonEvent represents mouse button press and release events in the Open Inventor event model.
Mouse event can only have one state: Press, Release or DoubleClick.
Mouse move events are represented by an SoLocation2Event.
Add an SoEventCallback node to the scene graph to handle Open Inventor events.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.openinventor.inventor.events.SoButtonEvent
SoButtonEvent.StatesNested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand -
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets which mouse button generated the event.static booleanisButtonDoubleClickEvent(SoEvent e, SoMouseButtonEvent.Buttons whichButton) Returns whether the passed event is a mouse button double click event of the passed button.static booleanisButtonPressEvent(SoEvent e, SoMouseButtonEvent.Buttons whichButton) Returns whether the passed event is a mouse button press event of the passed button.static booleanisButtonReleaseEvent(SoEvent e, SoMouseButtonEvent.Buttons whichButton) Returns whether the passed event is a mouse button release event of the passed button.voidSets which mouse button generated the event.Methods inherited from class com.openinventor.inventor.events.SoButtonEvent
getState, setStateMethods inherited from class com.openinventor.inventor.events.SoEvent
getNormalizedPosition, getPosition, getPosition, getPositionFloat, getPositionFloat, getTime, setAltDown, setButton1Down, setCtrlDown, setPosition, setPosition, setShiftDown, setTime, wasAltDown, wasButton1Down, wasCtrlDown, wasShiftDownMethods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoMouseButtonEvent
public SoMouseButtonEvent()Constructor.
-
-
Method Details
-
isButtonPressEvent
Returns whether the passed event is a mouse button press event of the passed button. WhenSoMouseButtonEvent.ANYis passed, this returns true if the event represents a button press of any mouse button. -
isButtonDoubleClickEvent
Returns whether the passed event is a mouse button double click event of the passed button. WhenSoMouseButtonEvent.ANYis passed, this returns true if the event represents a double click of any mouse button. -
setButton
Sets which mouse button generated the event. -
isButtonReleaseEvent
Returns whether the passed event is a mouse button release event of the passed button. WhenSoMouseButtonEvent.ANYis passed, this returns true if the event represents a button release of any mouse button. -
getButton
Gets which mouse button generated the event.
-