|Re: How to drag-and-drop from Eclipse to GEF editor? [message #1793654 is a reply to message #1793512]
||Mon, 13 August 2018 10:32
|| Matthias Wienand
Registered: March 2015
GEF does not provide drag and drop functionality by default. So the way to go would be a custom implementation for SWT Drag and Drop. The SWT Control for the GEF viewer is the FXCanvas that is constructed by AbstractFXEditor. You can access the FXCanvas using the getCanvas() accessor, which, unfortunately, is protected, so a subclass is needed in order to expose that FXCanvas.
Adding/Manipulating content in response to SWT Drag and Drop can be done via default policies and operations, though, e.g. ContentPolicy: https://github.com/eclipse/gef/blob/master/org.eclipse.gef.mvc.fx/src/org/eclipse/gef/mvc/fx/policies/ContentPolicy.java
edit: The IOnDragHandler interface is used for handling mouse press drag release inside JavaFX.
[Updated on: Mon, 13 August 2018 10:47]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01829 seconds