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

Bug 458274

Summary: [FX.UI] Adapt the SWT Cursor to the JavaFX Cursor.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF FXAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.10.0 (Mars) M5   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2015-01-23 10:45:26 EST
In JavaFX, the mouse cursor can be changed as follows:

  scene.setCursor(cursor);

Unfortunately, this does not change the cursor if JavaFX is embedded into an SWT application. Therefore, the FXCanvasEx class should listen to JavaFX cursor changes and adapt the SWT cursor accordingly.
Comment 1 Matthias Wienand CLA 2015-01-26 11:03:50 EST
I implemented the conversion from JavaFX Cursor to SWT Cursor within FXCanvasEx and ensured that the cursor is not overwritten by subsequent SWT #setCursor() calls. Many JavaFX standard cursors have an SWT equivalent. The rest have to be replaced with an image version in the future for a complete integration.

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