Java javafx.scene.input MouseEvent fields, constructors, methods, implement or subclass

Example usage for Java javafx.scene.input MouseEvent fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javafx.scene.input MouseEvent.

The text is from its open source code.

Field

EventTypeANY
Common supertype for all mouse event types.
EventTypeMOUSE_PRESSED
This event occurs when mouse button is pressed.
EventTypeMOUSE_RELEASED
This event occurs when mouse button is released.
EventTypeMOUSE_CLICKED
This event occurs when mouse button has been clicked (pressed and released on the same node).
EventTypeMOUSE_ENTERED
This event occurs when mouse enters a node.
EventTypeMOUSE_EXITED
This event occurs when mouse exits a node.
EventTypeMOUSE_MOVED
This event occurs when mouse moves within a node and no buttons are pressed.
EventTypeMOUSE_DRAGGED
This event occurs when mouse moves with a pressed button.

Method

voidconsume()
Marks this Event as consumed.
MouseButtongetButton()
Which, if any, of the mouse buttons is responsible for this event.
intgetClickCount()
Returns number of mouse clicks associated with this event.
EventTypegetEventType()
doublegetSceneX()
Returns horizontal position of the event relative to the origin of the Scene that contains the MouseEvent's source.
doublegetSceneY()
Returns vertical position of the event relative to the origin of the Scene that contains the MouseEvent's source.
doublegetScreenX()
Returns absolute horizontal position of the event.
doublegetScreenY()
Returns absolute vertical position of the event.
ObjectgetSource()
The object on which the Event initially occurred.
EventTargetgetTarget()
Returns the event target of this event.
doublegetX()
Horizontal position of the event relative to the origin of the MouseEvent's source.
doublegetY()
Vertical position of the event relative to the origin of the MouseEvent's source.
booleanisAltDown()
Whether or not the Alt modifier is down on this event.
booleanisControlDown()
Whether or not the Control modifier is down on this event.
booleanisMetaDown()
Whether or not the Meta modifier is down on this event.
booleanisMiddleButtonDown()
Returns true if middle button (button 2) is currently pressed.
booleanisPopupTrigger()
Returns true if this mouse event is the popup menu trigger event for the platform.
booleanisPrimaryButtonDown()
Returns true if primary button (button 1, usually the left) is currently pressed.
booleanisSecondaryButtonDown()
Returns true if secondary button (button 3, usually the right) is currently pressed.
booleanisShiftDown()
Whether or not the Shift modifier is down on this event.
booleanisShortcutDown()
Returns whether or not the host platform common shortcut modifier is down on this event.
booleanisStillSincePress()
Indicates whether the mouse cursor stayed in the system-provided hysteresis area since last pressed event that occurred before this event.