# Uses of Class
javafx.scene.input.MouseEvent

Packages that use MouseEvent
Package
Description
javafx.scene
Provides the core set of base classes for the JavaFX Scene Graph API.
javafx.scene.input
Provides the set of classes for mouse and keyboard input event handling.

## Uses of MouseEvent in javafx.scene

Methods in javafx.scene that return types with arguments of type MouseEvent
Modifier and Type
Method
Description
`final EventHandler<? super MouseEvent>`
Node.`getOnDragDetected()`
Gets the value of the `onDragDetected` property.
`final EventHandler<? super MouseEvent>`
Scene.`getOnDragDetected()`
Gets the value of the `onDragDetected` property.
`final EventHandler<? super MouseEvent>`
Node.`getOnMouseClicked()`
Gets the value of the `onMouseClicked` property.
`final EventHandler<? super MouseEvent>`
Scene.`getOnMouseClicked()`
Gets the value of the `onMouseClicked` property.
`final EventHandler<? super MouseEvent>`
Node.`getOnMouseDragged()`
Gets the value of the `onMouseDragged` property.
`final EventHandler<? super MouseEvent>`
Scene.`getOnMouseDragged()`
Gets the value of the `onMouseDragged` property.
`final EventHandler<? super MouseEvent>`
Node.`getOnMouseEntered()`
Gets the value of the `onMouseEntered` property.
`final EventHandler<? super MouseEvent>`
Scene.`getOnMouseEntered()`
Gets the value of the `onMouseEntered` property.
`final EventHandler<? super MouseEvent>`
Node.`getOnMouseExited()`
Gets the value of the `onMouseExited` property.
`final EventHandler<? super MouseEvent>`
Scene.`getOnMouseExited()`
Gets the value of the `onMouseExited` property.
`final EventHandler<? super MouseEvent>`
Node.`getOnMouseMoved()`
Gets the value of the `onMouseMoved` property.
`final EventHandler<? super MouseEvent>`
Scene.`getOnMouseMoved()`
Gets the value of the `onMouseMoved` property.
`final EventHandler<? super MouseEvent>`
Node.`getOnMousePressed()`
Gets the value of the `onMousePressed` property.
`final EventHandler<? super MouseEvent>`
Scene.`getOnMousePressed()`
Gets the value of the `onMousePressed` property.
`final EventHandler<? super MouseEvent>`
Node.`getOnMouseReleased()`
Gets the value of the `onMouseReleased` property.
`final EventHandler<? super MouseEvent>`
Scene.`getOnMouseReleased()`
Gets the value of the `onMouseReleased` property.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Node.`onDragDetectedProperty()`
Defines a function to be called when drag gesture has been detected.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Scene.`onDragDetectedProperty()`
Defines a function to be called when drag gesture has been detected.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Node.`onMouseClickedProperty()`
Defines a function to be called when a mouse button has been clicked (pressed and released) on this `Node`.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Scene.`onMouseClickedProperty()`
Defines a function to be called when a mouse button has been clicked (pressed and released) on this `Scene`.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Node.`onMouseDraggedProperty()`
Defines a function to be called when a mouse button is pressed on this `Node` and then dragged.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Scene.`onMouseDraggedProperty()`
Defines a function to be called when a mouse button is pressed on this `Scene` and then dragged.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Node.`onMouseEnteredProperty()`
Defines a function to be called when the mouse enters this `Node`.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Scene.`onMouseEnteredProperty()`
Defines a function to be called when the mouse enters this `Scene`.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Node.`onMouseExitedProperty()`
Defines a function to be called when the mouse exits this `Node`.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Scene.`onMouseExitedProperty()`
Defines a function to be called when the mouse exits this `Scene`.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Node.`onMouseMovedProperty()`
Defines a function to be called when mouse cursor moves within this `Node` but no buttons have been pushed.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Scene.`onMouseMovedProperty()`
Defines a function to be called when mouse cursor moves within this `Scene` but no buttons have been pushed.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Node.`onMousePressedProperty()`
Defines a function to be called when a mouse button has been pressed on this `Node`.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Scene.`onMousePressedProperty()`
Defines a function to be called when a mouse button has been pressed on this `Scene`.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Node.`onMouseReleasedProperty()`
Defines a function to be called when a mouse button has been released on this `Node`.
`final ObjectProperty<EventHandler<? super MouseEvent>>`
Scene.`onMouseReleasedProperty()`
Defines a function to be called when a mouse button has been released on this `Scene`.
Method parameters in javafx.scene with type arguments of type MouseEvent
Modifier and Type
Method
Description
`final void`
Node.`setOnDragDetected(EventHandler<? super MouseEvent> value)`
Sets the value of the `onDragDetected` property.
`final void`
Scene.`setOnDragDetected(EventHandler<? super MouseEvent> value)`
Sets the value of the `onDragDetected` property.
`final void`
Node.`setOnMouseClicked(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseClicked` property.
`final void`
Scene.`setOnMouseClicked(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseClicked` property.
`final void`
Node.`setOnMouseDragged(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseDragged` property.
`final void`
Scene.`setOnMouseDragged(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseDragged` property.
`final void`
Node.`setOnMouseEntered(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseEntered` property.
`final void`
Scene.`setOnMouseEntered(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseEntered` property.
`final void`
Node.`setOnMouseExited(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseExited` property.
`final void`
Scene.`setOnMouseExited(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseExited` property.
`final void`
Node.`setOnMouseMoved(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseMoved` property.
`final void`
Scene.`setOnMouseMoved(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseMoved` property.
`final void`
Node.`setOnMousePressed(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMousePressed` property.
`final void`
Scene.`setOnMousePressed(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMousePressed` property.
`final void`
Node.`setOnMouseReleased(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseReleased` property.
`final void`
Scene.`setOnMouseReleased(EventHandler<? super MouseEvent> value)`
Sets the value of the `onMouseReleased` property.

## Uses of MouseEvent in javafx.scene.input

Subclasses of MouseEvent in javafx.scene.input
Modifier and Type
Class
Description
`final class`
`MouseDragEvent`
Mouse drag events are delivered to potential gesture targets during full press-drag-release gestures.
Fields in javafx.scene.input with type parameters of type MouseEvent
Modifier and Type
Field
Description
`static final EventType<MouseEvent>`
MouseEvent.`ANY`
Common supertype for all mouse event types.
`static final EventType<MouseEvent>`
MouseEvent.`DRAG_DETECTED`
This event is delivered to a node that is identified as a source of a dragging gesture.
`static final EventType<MouseEvent>`
MouseEvent.`MOUSE_CLICKED`
This event occurs when mouse button has been clicked (pressed and released on the same node).
`static final EventType<MouseEvent>`
MouseEvent.`MOUSE_DRAGGED`
This event occurs when mouse moves with a pressed button.
`static final EventType<MouseEvent>`
MouseEvent.`MOUSE_ENTERED`
This event occurs when mouse enters a node.
`static final EventType<MouseEvent>`
MouseEvent.`MOUSE_ENTERED_TARGET`
This event occurs when mouse enters a node.
`static final EventType<MouseEvent>`
MouseEvent.`MOUSE_EXITED`
This event occurs when mouse exits a node.
`static final EventType<MouseEvent>`
MouseEvent.`MOUSE_EXITED_TARGET`
This event occurs when mouse exits a node.
`static final EventType<MouseEvent>`
MouseEvent.`MOUSE_MOVED`
This event occurs when mouse moves within a node and no buttons are pressed.
`static final EventType<MouseEvent>`
MouseEvent.`MOUSE_PRESSED`
This event occurs when mouse button is pressed.
`static final EventType<MouseEvent>`
MouseEvent.`MOUSE_RELEASED`
This event occurs when mouse button is released.
Methods in javafx.scene.input that return MouseEvent
Modifier and Type
Method
Description
`MouseEvent`
MouseEvent.`copyFor(Object newSource, EventTarget newTarget)`
Copies this event for a different source and target.
`MouseEvent`
MouseEvent.`copyFor(Object newSource, EventTarget newTarget, EventType<? extends MouseEvent> eventType)`
Creates a copy of the given event with the given fields substituted.
Methods in javafx.scene.input that return types with arguments of type MouseEvent
Modifier and Type
Method
Description
`EventType<? extends MouseEvent>`
MouseEvent.`getEventType()`
Methods in javafx.scene.input with parameters of type MouseEvent
Modifier and Type
Method
Description
`static MouseDragEvent`
MouseEvent.`copyForMouseDragEvent(MouseEvent e, Object source, EventTarget target, EventType<MouseDragEvent> type, Object gestureSource, PickResult pickResult)`
Creates a copy of this mouse event of MouseDragEvent type
Method parameters in javafx.scene.input with type arguments of type MouseEvent
Modifier and Type
Method
Description
`MouseDragEvent`
MouseDragEvent.`copyFor(Object newSource, EventTarget newTarget, EventType<? extends MouseEvent> type)`
`MouseEvent`
MouseEvent.`copyFor(Object newSource, EventTarget newTarget, EventType<? extends MouseEvent> eventType)`
Creates a copy of the given event with the given fields substituted.
Constructor parameters in javafx.scene.input with type arguments of type MouseEvent
Modifier
Constructor
Description
``
`MouseEvent(Object source, EventTarget target, EventType<? extends MouseEvent> eventType, double x, double y, double screenX, double screenY, MouseButton button, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean primaryButtonDown, boolean middleButtonDown, boolean secondaryButtonDown, boolean synthesized, boolean popupTrigger, boolean stillSincePress, PickResult pickResult)`
Constructs new MouseEvent event.
``
`MouseEvent(EventType<? extends MouseEvent> eventType, double x, double y, double screenX, double screenY, MouseButton button, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean primaryButtonDown, boolean middleButtonDown, boolean secondaryButtonDown, boolean synthesized, boolean popupTrigger, boolean stillSincePress, PickResult pickResult)`
Constructs new MouseEvent event with null source and target.