MouseEvent

class MouseEvent(val delegate: MouseEvent) extends InputEvent with SFXDelegate[MouseEvent]
Companion
object
class Event
trait SFXDelegate[MouseEvent]
class Object
trait Matchable
class Any

Value members

Constructors

def this(eventType: EventType[_ <: MouseEvent], x: Double, y: Double, screenX: Double, screenY: Double, button: MouseButton, clickCount: Int, shiftDown: Boolean, controlDown: Boolean, altDown: Boolean, metaDown: Boolean, primaryButtonDown: Boolean, middleButtonDown: Boolean, secondaryButtonDown: Boolean, synthesized: Boolean, popupTrigger: Boolean, stillSincePress: Boolean, pickResult: PickResult)

Constructs new MouseEvent event with null source and target.

Constructs new MouseEvent event with null source and target.

Value Params
altDown

true if alt modifier was pressed.

button

the mouse button used

clickCount

number of click counts

controlDown

true if control modifier was pressed.

eventType

The type of the event.

metaDown

true if meta modifier was pressed.

middleButtonDown

true if middle button was pressed.

pickResult

pick result. Can be null, in this case a 2D pick result without any further values is constructed based on the scene coordinates

popupTrigger

whether this event denotes a popup trigger for current platform

primaryButtonDown

true if primary button was pressed.

screenX

The x coordinate relative to screen.

screenY

The y coordinate relative to screen.

secondaryButtonDown

true if secondary button was pressed.

shiftDown

true if shift modifier was pressed.

stillSincePress

see { @link #isStillSincePress() }

synthesized

if this event was synthesized

x

The x with respect to the scene.

y

The y with respect to the scene.

Since

JavaFX 8.0

def this(source: Any, target: EventTarget, eventType: EventType[_ <: MouseEvent], x: Double, y: Double, screenX: Double, screenY: Double, button: MouseButton, clickCount: Int, shiftDown: Boolean, controlDown: Boolean, altDown: Boolean, metaDown: Boolean, primaryButtonDown: Boolean, middleButtonDown: Boolean, secondaryButtonDown: Boolean, synthesized: Boolean, popupTrigger: Boolean, stillSincePress: Boolean, pickResult: PickResult)

Constructs new MouseEvent event.

Constructs new MouseEvent event.

Value Params
altDown

true if alt modifier was pressed.

button

the mouse button used

clickCount

number of click counts

controlDown

true if control modifier was pressed.

eventType

The type of the event.

metaDown

true if meta modifier was pressed.

middleButtonDown

true if middle button was pressed.

pickResult

pick result. Can be null, in this case a 2D pick result without any further values is constructed based on the scene coordinates and target

popupTrigger

whether this event denotes a popup trigger for current platform

primaryButtonDown

true if primary button was pressed.

screenX

The x coordinate relative to screen.

screenY

The y coordinate relative to screen.

secondaryButtonDown

true if secondary button was pressed.

shiftDown

true if shift modifier was pressed.

source

the source of the event. Can be null.

stillSincePress

see { @link #isStillSincePress() }

synthesized

if this event was synthesized

target

the target of the event. Can be null.

x

The x with respect to the source. Should be in scene coordinates if source == null or source is not a Node.

y

The y with respect to the source. Should be in scene coordinates if source == null or source is not a Node.

Since

JavaFX 8.0

Concrete methods

def altDown: Boolean

Whether or not the Alt modifier is down on this event.

Whether or not the Alt modifier is down on this event.

Which, if any, of the mouse buttons is responsible for this event.

Which, if any, of the mouse buttons is responsible for this event.

def clickCount: Int

Returns number of mouse clicks associated with this event.

Returns number of mouse clicks associated with this event.

def controlDown: Boolean

Whether or not the Control modifier is down on this event.

Whether or not the Control modifier is down on this event.

def dragDetect: Boolean

Determines whether this event will be followed by DRAG_DETECTED event.

Determines whether this event will be followed by DRAG_DETECTED event.

def dragDetect_=(detected: Boolean): Unit

Augments drag detection behavior.

Augments drag detection behavior.

override def eventType: EventType[_ <: MouseEvent]

Gets the event type of this event.

Gets the event type of this event.

Definition Classes
def metaDown: Boolean

Whether or not the Meta modifier is down on this event.

Whether or not the Meta modifier is down on this event.

def middleButtonDown: Boolean

Returns true if middle button (button 2) is currently pressed.

Returns true if middle button (button 2) is currently pressed.

Returns information about the pick.

Returns information about the pick.

def popupTrigger: Boolean

Returns true if this mouse event is the popup menu trigger event for the platform.

Returns true if this mouse event is the popup menu trigger event for the platform.

def primaryButtonDown: Boolean

Returns true if primary button (button 1, usually the left) is currently pressed.

Returns true if primary button (button 1, usually the left) is currently pressed.

def sceneX: Double
def sceneY: Double
def screenX: Double
def screenY: Double
def secondaryButtonDown: Boolean

Returns true if secondary button (button 1, usually the right) is currently pressed.

Returns true if secondary button (button 1, usually the right) is currently pressed.

def shiftDown: Boolean

Whether or not the Shift modifier is down on this event.

Whether or not the Shift modifier is down on this event.

def shortcutDown: Boolean

Returns whether or not the host platform common shortcut modifier is down on this event.

Returns whether or not the host platform common shortcut modifier is down on this event.

def stillSincePress: Boolean

Indicates whether the mouse cursor stayed in the system-provided hysteresis area since last pressed event that occurred before this event.

Indicates whether the mouse cursor stayed in the system-provided hysteresis area since last pressed event that occurred before this event.

def synthesized: Boolean

Indicates whether this event is synthesized from using a touch screen instead of usual mouse event source devices like mouse or track pad.

Indicates whether this event is synthesized from using a touch screen instead of usual mouse event source devices like mouse or track pad.

def x: Double
def y: Double
def z: Double

Depth position of the event relative to the origin of the MouseEvent's source.

Depth position of the event relative to the origin of the MouseEvent's source.

Inherited methods

def consume(): Unit

Marks this Event as consumed. This stops its further propagation.

Marks this Event as consumed. This stops its further propagation.

Inherited from
Event
def consumed: Boolean

Indicates whether this Event has been consumed by any filter or handler.

Indicates whether this Event has been consumed by any filter or handler.

Inherited from
Event
def copyFor(newSource: AnyRef, newTarget: EventTarget): Event

Creates and returns a copy of this event with the specified event source and target.

Creates and returns a copy of this event with the specified event source and target.

Inherited from
Event
override def equals(ref: Any): Boolean

Verifies if a object is equals to this delegate.

Verifies if a object is equals to this delegate.

Value Params
ref

Object to be compared.

Returns

if the other object is equals to this delegate or not.

Definition Classes
Inherited from
SFXDelegate
override def hashCode: Int
Returns

The delegate hashcode

Definition Classes
Inherited from
SFXDelegate
def source: Object

Returns the object on which the Event initially occurred.

Returns the object on which the Event initially occurred.

Inherited from
Event
def target: EventTarget

Returns the event target of this event.

Returns the event target of this event.

Inherited from
Event
override def toString: String
Returns

Returns the original delegate's toString() adding a [SFX] prefix.

Definition Classes
Inherited from
SFXDelegate

Concrete fields

override val delegate: MouseEvent