Skip to main content



      Home
Home » Eclipse Projects » GEF » Can I change the cursor during DnD?(How can I show different cursors during DnD, not just YES/NO)
Can I change the cursor during DnD? [message #645571] Fri, 17 December 2010 22:20 Go to next message
Eclipse UserFriend
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 #645594 is a reply to message #645571] Sat, 18 December 2010 08:33 Go to previous messageGo to next message
Eclipse UserFriend
Take a look at DragEditsPartTracker and its superclass SelectEditPartsTracker. They provide a means to "calculate" cursors during a drag operation.
Re: Can I change the cursor during DnD? [message #645598 is a reply to message #645594] Sat, 18 December 2010 09:43 Go to previous message
Eclipse UserFriend
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] by Moderator

Previous Topic:Disable selection of figures in GEF
Next Topic:Drag & drop in Outline view is completely broken
Goto Forum:
  


Current Time: Tue Apr 29 18:34:31 EDT 2025

Powered by FUDForum. Page generated in 0.08449 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top