MouseEvent

scalafx.scene.input.MouseEvent
See theMouseEvent companion object
class MouseEvent(val delegate: MouseEvent) extends InputEvent, SFXDelegate[MouseEvent]

Attributes

Companion
object
Graph
Supertypes
class InputEvent
class Event
trait SFXDelegate[MouseEvent]
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

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 parameters

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.

Attributes

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 parameters

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.

Attributes

Since

JavaFX 8.0

Concrete methods

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

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

Attributes

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

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

Attributes

Returns number of mouse clicks associated with this event.

Returns number of mouse clicks associated with this event.

Attributes

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

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

Attributes

Determines whether this event will be followed by DRAG_DETECTED event.

Determines whether this event will be followed by DRAG_DETECTED event.

Attributes

def dragDetect_=(detected: Boolean): Unit

Augments drag detection behavior.

Augments drag detection behavior.

Attributes

override def eventType: EventType[_ <: MouseEvent]

Gets the event type of this event.

Gets the event type of this event.

Attributes

Definition Classes

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

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

Attributes

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

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

Attributes

Returns information about the pick.

Returns information about the pick.

Attributes

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.

Attributes

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.

Attributes

def sceneX: Double
def sceneY: Double

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.

Attributes

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

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

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

Inherited from:
Event

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

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

Attributes

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.

Attributes

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 parameters

ref

Object to be compared.

Attributes

Returns

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

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
override def hashCode: Int

Attributes

Returns

The delegate hashcode

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
def source: Object

Returns the object on which the Event initially occurred.

Returns the object on which the Event initially occurred.

Attributes

Inherited from:
Event
def target: EventTarget

Returns the event target of this event.

Returns the event target of this event.

Attributes

Inherited from:
Event
override def toString: String

Attributes

Returns

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

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate

Concrete fields

override val delegate: MouseEvent

JavaFX object to be wrapped.

JavaFX object to be wrapped.

Attributes