Bug 376573 - GraphicalEditorWithFlyoutPalette & mouse wheel scrolling
Summary: GraphicalEditorWithFlyoutPalette & mouse wheel scrolling
Status: ASSIGNED
Alias: None
Product: RAP
Classification: RT
Component: Incubator (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Austin Riddle CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-12 04:44 EDT by Andrea Poli CLA
Modified: 2012-04-12 17:28 EDT (History)
1 user (show)

See Also:


Attachments
Patch that enables mouse wheel scroll in GEF port (22.47 KB, patch)
2012-04-12 17:28 EDT, Austin Riddle CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Poli CLA 2012-04-12 04:44:03 EDT
Build Identifier: 20120322-1740

When you try to scroll the editor area of a GraphicalEditorWithFlyoutPalette then you cannot scroll it using the mouse wheel. The only way the mouse wheel works is to move the mouse over the scroll bar button. 
I've tried different approaches in order to solve this problem:
1. to add a MouseWheelHandler to the GraphicalViewer using setProperty method
   1a. setting CTRL as key
   1b. setting SWT.None as key
2. to use addListener method setting SWT.MouseWheel (this constant is not defined 
   for RAP so I tried to use the raw value, 37)
3. to filter mouse wheel event using addFilter method of Display class

Reproducible: Always

Steps to Reproduce:
1. create an editor using GraphicalEditorWithFlyoutPalette
2. launch the application inside Firefox, Chrome or Eclipse embedded browser
3. try to scroll the editor area using mouse wheel
Comment 1 Austin Riddle CLA 2012-04-12 17:28:34 EDT
Created attachment 213938 [details]
Patch that enables mouse wheel scroll in GEF port

Unfortunately, this feature cannot be supported fully without modification to the RWT bundle.  The reason is that Draw2D uses a viewport to handle scrolling. The use of the viewport allows Draw2D to scale much better than if it relied on a widget to represent the size of the scrollable area. The provided patch demonstrates one way of supporting the viewport model, but until RWT supports mouse wheel events officially, any solution will have to be in the form of a patch. If you would like to open a separate ticket on enabling Mouse Wheel events in RWT, please do. Hope this helps.