Summary
Add a MouseDragEvent#MOUSE_DRAG_DONE
event type and handlers to indicate when a full press-drag-release chain is done.
Problem
There is no current way for the user to know when a full press-drag-release chain is done. This is unlike the Drag-n-Drop chain of DragEvent
that has a DRAG_DONE
event type.
Solution
Add a MouseDragEvent#MOUSE_DRAG_DONE
event type. Convenience handlers for Node
and Scene
are added as well to align with the other event types.
Specification
Field added to javafx.scene.input.MouseDragEvent
:
/// This event occurs when the gesture ends. It is delivered exactly once to the source node/scene, and is always the
/// last event in the full press-drag-release process. It is delivered even when the mouse is outside the application.
///
/// @since 26
public static final EventType<MouseDragEvent> MOUSE_DRAG_DONE
Methods added to javafx.scene.Node
:
public final void setOnMouseDragDone(EventHandler<? super MouseDragEvent> value)
public final EventHandler<? super MouseDragEvent> getOnMouseDragDone()
/// Defines a function to be called when a full press-drag-release gesture ends with this node as its source.
///
/// @return the event handler that is called when a full press-drag-release finishes
/// @see MouseDragEvent#MOUSE_DRAG_DONE
/// @since 26
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragDoneProperty()
Methods added to javafx.scene.Scene
:
/// Defines a function to be called when a full press-drag-release gesture ends.
///
/// @see MouseDragEvent#MOUSE_DRAG_DONE
/// @since 26
private ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragDone;
public final void setOnMouseDragDone(EventHandler<? super MouseDragEvent> value)
public final EventHandler<? super MouseDragEvent> getOnMouseDragDone()
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragDoneProperty()
- csr of
-
JDK-8365635 Add MOUSE_DRAG_DONE event type
-
- Open
-