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

Bug 484639

Summary: Remove FXCursorBehavior and related Provider<Map<KeyCode, Cursor>> implementations.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: Matthias Wienand <matthias.wienand>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.2.0   
Target Milestone: 4.0.0 / 3.11.0 (Neon) M5   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 481810    

Description Matthias Wienand CLA 2015-12-18 03:56:29 EST
Currently, the FXCursorBehavior updates the mouse cursor depending on a related Provider<Map<KeyCode, Cursor>> implementation that provides mouse cursors for pressed keys. As expressed within bug #481810, updating the mouse cursor should be a responsibility of the interaction policies.
Comment 1 Matthias Wienand CLA 2015-12-18 05:30:55 EST
I removed the FXCursorBehavior and all related Provider<Map<KeyCode, Cursor>> implementations and introduced AbstractFXInteractionPolicy that provides methods to change the mouse cursor. Every interaction policy can specify an indication cursor (default is null). This indication cursor should be shown when a part is hovered for which an *OnClick- or *OnDragPolicy is registerd. Currently, the cursor is only changed when the policy starts processing events. This should be changed so that the FXClickDragTool switches to the indication cursor on hover.
Comment 2 Matthias Wienand CLA 2015-12-21 13:46:21 EST
I implemented querying (and displaying) the indication cursor upon mouse moves. The AbstractFXInteractionPolicy#getIndicationCursor() method does now receive the MouseEvent that initiated querying the indication cursor. Therefore, policies can return null if they are not going to perform any actions. The code is published on the master branch, therefore, I resolve this ticket as fixed for 3.11.0M5.