-
Enhancement
-
Resolution: Fixed
-
P3
-
fx2.1
Provide API for common gestures - scrolling, rotation and zoom.
Create GestureEvent as a parent of all the mentioned events (and child of InputEvent), containing coordinates (node, scene, screen) and modifiers. Create RotateEvent with types ROTATION_STARTED, ROTATE, ROTATION_FINISHED, containing angle (rotation of this event in degrees) and totalAngle (rotation of the entire gesture). Create ZoomEvent with types ZOOM_STARTED, ZOOM, ZOOM_FINISHED, containing zoomFactor (multiplicative zoom factor of this event) and totalZoomFactor (zoom factor of the entire gesture). The ScrollEvent already exists, add event types SCROLL_STARTED and SCROLL_FINISHED, add totalDeltaX and totalDeltaY (scroll amount of the whole gesture), add touchCount (number of touch points causing the event).
Touchscreen may produce mouse scroll gesture and mouse dragging as a result of the same action. Some apps want to react differently to touch screen scrolling and mouse wheel scrolling. To address those issues, provide
- GestureEvent.isDirect() - true for touch screen (the gesture is performed directly at the coordinates), false for mouse/trackpad (the gesture is performed indirectly, usually mouse cursor location is used for the coordinates)
- MouseEvent.isSynthesized() - true for touch screen (useful for ignoring mouse dragging "duplicated by" scrolling), false for mouse/trackpad.
Also add the on* handlers to Node and Scene.
Create GestureEvent as a parent of all the mentioned events (and child of InputEvent), containing coordinates (node, scene, screen) and modifiers. Create RotateEvent with types ROTATION_STARTED, ROTATE, ROTATION_FINISHED, containing angle (rotation of this event in degrees) and totalAngle (rotation of the entire gesture). Create ZoomEvent with types ZOOM_STARTED, ZOOM, ZOOM_FINISHED, containing zoomFactor (multiplicative zoom factor of this event) and totalZoomFactor (zoom factor of the entire gesture). The ScrollEvent already exists, add event types SCROLL_STARTED and SCROLL_FINISHED, add totalDeltaX and totalDeltaY (scroll amount of the whole gesture), add touchCount (number of touch points causing the event).
Touchscreen may produce mouse scroll gesture and mouse dragging as a result of the same action. Some apps want to react differently to touch screen scrolling and mouse wheel scrolling. To address those issues, provide
- GestureEvent.isDirect() - true for touch screen (the gesture is performed directly at the coordinates), false for mouse/trackpad (the gesture is performed indirectly, usually mouse cursor location is used for the coordinates)
- MouseEvent.isSynthesized() - true for touch screen (useful for ignoring mouse dragging "duplicated by" scrolling), false for mouse/trackpad.
Also add the on* handlers to Node and Scene.
- blocks
-
JDK-8102201 Swipe event
- Closed
- relates to
-
JDK-8092366 Pointing device capability checks
- Open