Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8100898

Common gestures API

XMLWordPrintable

      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.

            psafrata Pavel Šafrata
            psafrata Pavel Šafrata
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: