Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.1
    • Fix Version/s: 7u6
    • Component/s: javafx

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: