Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » mixing GEF drag with native DnD.
mixing GEF drag with native DnD. [message #239433] Mon, 29 October 2007 12:04 Go to next message
Eclipse UserFriend
Originally posted by: alnospammajor.noboxspamspoon.com

are there issues to be aware of when mixing native DnD and regular GEF
handling of drag events?

i'm attempting to use a Drag Tracker within a GEF viewer which also has
a GEF Drag Source listener installed on its control (and a drop target
as well). when i begin to drag a handle, its drag tracker is being
correctly installed in the selection tool. however, after drag is
initiated, Tool.MouseDrag (or Tool.MouseMove) are not being called.
instead Tool.nativeDragStart is called. which means the "correct"
SimpleDragTracker.handleXXXX methods are not being called and the tool
is not functioning as expected.

if the native DnD DragSourceListener is not installed the GEF drag
tracker works as expected.

i suppose i could provide equivalent implementations of
handleNativeDragStarted (CnP the SimpleDragTracker.handleDrag?).
however, i'm not sure this will fix the problem (the drop target
listeners are also being activated during the drag which screws up the
visual feedback).

another option might be to uninstall the native DnD drag source
(AbstractEditPartViewer.removeDragSourceListener) when a GEF drag starts
and turn it on when the drag ends. the timing could get quite tricky
though, so i'm not sure this is a real option either.

is this a known problem? or am i doing something obviously wrong? if
it's a known issue, can someone suggest an approach to solving it. or
perhaps there is some simple fix or workaround that i've completely
missed (i noticed there was a mouse capture flag in some of the event
dispatcher code, which may be relevant)?

i'm using the GEF in CVS head and 3.4M2 SDK.


regards,

al
Re: mixing GEF drag with native DnD. [message #239454 is a reply to message #239433] Mon, 29 October 2007 14:43 Go to previous message
Eclipse UserFriend
Originally posted by: alnospammajor.noboxspamspoon.com

problem solved. it turns out that a little more intelligence was
required in the implementation of "DragSourceListener.dragStart" (for
native DnD) to distinguish between a drag of the selected edit part and
a drag of _a handle_ of the selected edit part. once this logic is in
place, everything works as expected.
Previous Topic:Zoom query
Next Topic:Doubt for multipage Graphical editor
Goto Forum:
  


Current Time: Fri Apr 26 09:07:55 GMT 2024

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

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

Back to the top