Bug 371152 - Multitouch gesture support
Summary: Multitouch gesture support
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Zest (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 371314
Blocks:
  Show dependency tree
 
Reported: 2012-02-09 17:43 EST by Zoltan Ujhelyi CLA
Modified: 2012-02-24 15:45 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltan Ujhelyi CLA 2012-02-09 17:43:17 EST
When I read Jan Köhnlein's recent blog post about his experiments with multitouch support for a GEF editor (http://koehnlein.blogspot.com/2012/01/multitouch-gestures-in-generic-graph.html), I was thinking whether something like this is possible for Zest.

I experimented a bit, and found, that magnification support is quite easy to implement and use. However, it is not clear for me (at least for now), how this feature interacts with the already used zoom contributors.

For the rotate gesture I believe, it would make sense to use it to rotate the displayed graph (or maybe only its selected elements).

On the other hand, I don't think we could support the pan and sweep gestures on the widget level - it would make sense to leave that to the user.

I am willing to experiment a bit more with this area to see whether its usable enough to ship it with Zest 2.0 (if it is not too late for that :) ).

My question is whether I should open a feature branch for this experimental feature (I believe, it will need a few commits before it will become usable), or should I put the commits right into the master, and revert them if needed? Meanwhile, I pushed my modifications to Github: https://github.com/ujhelyiz/zest/commit/f2e8d919f0c026e1ce81e54fd612368f088999a1
Comment 1 Fabian Steeg CLA 2012-02-10 16:08:34 EST
Very cool!

Since there are no immediate formal release plans for Zest 2.0, I'd say you can push any pieces that you feel are useful on their own to the master. For incomplete stuff you could just push to a feature branch at the eclipse.org repo - or work on GitHub, if you prefer.
Comment 2 Zoltan Ujhelyi CLA 2012-02-23 04:49:41 EST
A solution I believe is close to be finished is available in the multitouch branch. This adds automatically support for zoom and rotation gestures.

For zooming, the ZoomManager component is moved from the JFace API to the SWT API - this adds direct zooming support to Graph widgets (not only GraphViewers), and does it consistently with the zoom gestures.

Rotation gestures either rotate the all nodes of the graph, or just the selected nodes around their geometric center. A known issue with rotation gestures, that they do not work on in Eclipse 3.7 on OSX 64 bit (see bug 349812). It is already fixed for Juno.

In order to support extensions, both gestures are supported using different GestureListeners, that are added by default to the Zest graphs. However, if you use the ZestStyles.GESTURES_DISABLED, these default listeners are not added, and you could replace them with your own.

I believe, the contribution is close to complete, but it would be nice if someone else could test it a bit; I am not entirely sure about the usefulness of rotation gestures. I wait a few days before I merge the changes into the master branch, and then close the ticket as fixed (unless there are some objections).
Comment 3 Fabian Steeg CLA 2012-02-23 16:16:16 EST
(In reply to comment #2)

I gave it a try and this is really cool, in particular this:

> Rotation gestures either rotate the all nodes of the graph, or just the
> selected nodes around their geometric center.

The consistent pinch to zoom on widgets and viewers is really useful. I think both gestures add some very intuitive ways to interact with Zest graphs when using a multitouch input device.
Comment 4 Zoltan Ujhelyi CLA 2012-02-24 15:45:53 EST
Thanks for testing.

I added an explicit dependency to SWT 3.7, as multitouch gestures are only added then, and merged the changes back to master.