Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Zest - Zooming functionality via mouse wheel
Zest - Zooming functionality via mouse wheel [message #946520] Tue, 16 October 2012 09:02 Go to next message
Alexander von Eich is currently offline Alexander von EichFriend
Messages: 7
Registered: March 2012
Junior Member

I included a ZoomContributionViewItem in the RCP toolbar to zoom a zest graph. This works very well. But now I want to zoom using a mouse wheel. I dont have an idea how I could achieve this. Or is using the ZoomContribution the only way to zoom a ZEST Graph?


Re: Zest - Zooming functionality via mouse wheel [message #957913 is a reply to message #946520] Thu, 25 October 2012 15:47 Go to previous message
Johan Schulz is currently offline Johan SchulzFriend
Messages: 20
Registered: November 2010
Junior Member
I use this snippet in my Viewpart to get the default zoom behavior CTRL+MWheel.

viewer.getGraphControl().addMouseWheelListener( new MouseWheelListener() {
            public void mouseScrolled(final MouseEvent ev) {
                if (( ev.stateMask & SWT.CTRL ) == 0)
                if (ev.count > 0) {
                } else if (ev.count < 0) {
        } );


Previous Topic:Move edit Part, replace period key
Next Topic:Using InternalImages
Goto Forum:

Current Time: Sun Apr 22 22:22:35 GMT 2018

Powered by FUDForum. Page generated in 0.01964 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software