Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » DragAndDrop
DragAndDrop [message #228231] Mon, 18 December 2006 03:50 Go to next message
Eclipse User
Originally posted by: daniel-p.gmx.de

Hi everybode,

I have some problems implementing DnD. I want to drag items from a view to
a graphical editor. That works fine with one item (I'm using the
'AbstractTransferDropTargetListener'). But now I want to be able to drag
and drop multiple items. The problem is on the TargetListener side,
because it internally request the objetc creation. so, do I have to
provide my own implmentation of a TargetDropListener or can I somehow use
the 'AbstractTransferDropTargetListener'?

Cheers,

Dan
Re: DragAndDrop [message #228288 is a reply to message #228231] Tue, 19 December 2006 01:54 Go to previous messageGo to next message
Alex Boyko is currently offline Alex Boyko
Messages: 200
Registered: July 2009
Senior Member
Hi,

Perhaps you could extend AbstractTransferDropTargetListener and provide
your own implementation for #getObjectsBeingDropped(), i.e. get the
transfer object, cast it into Java object and then in StructuredSelection
probably... then you could examine what's in the selection and create a
list of objects that are being dropped in the graphical viewer (model
elements most likely). Then using these objects and mouse location a
request can be created and used to create the command by edit policies.
I'm not an expert in this area, but perhaps this would help.

Cheers,
Alex
Re: DragAndDrop [message #228338 is a reply to message #228288] Tue, 19 December 2006 11:05 Go to previous message
Eclipse User
Originally posted by: daniel-p.gmx.de

Hi Alex,

Thanks for the idea. Now I've overriden the handleDrop event and create a
new request for each object being dropped and it works.

Thanks,

Dan
Previous Topic:Lazy-loading while rendering the graph
Next Topic:Connection to front?
Goto Forum:
  


Current Time: Fri Aug 22 11:44:00 EDT 2014

Powered by FUDForum. Page generated in 0.01494 seconds