Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 480489

Summary: The Abstract*Gesture classes do not process events that are consumed by controls.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF FXAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: nyssen, thomas.kutz
Version: 0.2.0   
Target Milestone: 4.0.0 / 3.11.0 (Neon) M4   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 481677    

Description Matthias Wienand CLA 2015-10-23 05:49:22 EDT
The AbstractFXMouseDragGesture registers a MOUSE_PRESSED event handler on the Scene. Unfortunately, all JavaFX Controls consume mouse events on the bubbling phase. Therefore, the AbstractFXMouseDragGesture cannot be used to process mouse events that are dispatched through a JavaFX Control (e.g. SplitPane).

Possibly, the gesture should provide an option to process all events. However, it would be even better to use a custom EventDispatcher on the Scene, so that the information if the event is consumed is available when processing it.
Comment 1 Matthias Wienand CLA 2015-11-20 09:21:22 EST
Not only the AbstractMouseDragGesture, but all Abstract*Gesture classes need to use event filters, so that it is possible for users to process all events.

I changed the Abstract*Gesture classes to use event filters instead of event handlers. Thereby, all events are now forwarded to the gesture callback methods. This enables users to decide which events to process and which events to disregard. Information on whether the event is consumed or not is not available when processing the event, though. However, since route construction is already done when processing the event, some information can be gathered by analyzing the event dispatch chain via a JavaFX EventDispatcher.

The code is published on the master branch. Therefore, I resolve this ticket as fixed for 3.11.0M4.