| Can I change the cursor during DnD? [message #645571] |
Fri, 17 December 2010 22:20  |
Felix L J Mayer Messages: 202 Registered: July 2009 |
Senior Member |
|
|
|
I am dragging a Java IType from the Package Explorer to onto my diagram. Depending on the EditPart underneath, I would like show different cursors if dropping is possible. I have looked into various places that deal with cursors (AbstractTool, Control, EditPartViewer), but none of the cursor-related methods are executed when a drag is in progress. Is there any way to change the cursor?
|
|
|
|
| Re: Can I change the cursor during DnD? [message #645598 is a reply to message #645594] |
Sat, 18 December 2010 09:43  |
Felix L J Mayer Messages: 202 Registered: July 2009 |
Senior Member |
|
|
SelectEditPartsTracker is a subclass of AbstractTool, which I already investigated. I put breakpoints into the calculateCursor() methods, but they are not executed when I drag something from the Package Explorer. The only thing I see executed is EditPolicy.getCommand(), and the cursor does change when null is returned. However, I failed to find any code that actually changes the cursor afterwards. I couldn't even find a reference to org.eclipse.swt.graphics.Cursor in the org.eclipse.swt.dnd package.
[Updated on: Sat, 18 December 2010 09:57] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01544 seconds