Drag and drop + DragTracker [message #223386] |
Tue, 26 September 2006 09:43 |
Eclipse User |
|
|
|
Originally posted by: james.willans.xactium.com
I'd like to support drag and drop between different GEF editors and also
from GEF editors to other viewers such as tree and property editors. I
would expect the CTRL key modifier to distinguish between a drag on the
same diagram and a drag from one diagram to another.
How do I go about implementing this? I can't add a
TransferDragSourceListener to the node's viewer since this invalidates the
DragEditPartsTracker used for regular moving of nodes. Can I extend
DragEditPartsTracker so that when a drop is performed in conjunction with
a CTRL modifier, data is copied to the clipboard?
Thanks,
James
|
|
|
Re: Drag and drop + DragTracker [message #223395 is a reply to message #223386] |
Tue, 26 September 2006 14:26 |
Eclipse User |
|
|
|
Originally posted by: none.ibm.com
> How do I go about implementing this? I can't add a
> TransferDragSourceListener to the node's viewer since this invalidates the
Yes, you can. The drag listener should only say that it's enabled when CTRL
is being held. Of course, if CTRL key is released, you can't switch back to
the tracker.
BTW, CTRL means clone currently, so you're breaking from convention, but you
don't have many options due to the fact that DND can not be dynamically
started and stopped.
> DragEditPartsTracker used for regular moving of nodes. Can I extend
> DragEditPartsTracker so that when a drop is performed in conjunction with
> a CTRL modifier, data is copied to the clipboard?
>
> Thanks,
>
> James
>
|
|
|
Re: Drag and drop + DragTracker [message #223409 is a reply to message #223395] |
Tue, 26 September 2006 15:53 |
Eclipse User |
|
|
|
Originally posted by: james.willans.xactium.com
Thanks Randy, that makes sense. How can I determine that the CTRL key is
being pressed in an AbstractTransferDragSourceListener?
Thanks,
James
|
|
|
|
Powered by
FUDForum. Page generated in 0.03618 seconds