Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Problem with dnd
Problem with dnd [message #181739] Thu, 19 May 2005 14:50 Go to next message
Eclipse UserFriend
Originally posted by: paolino125.hotmail.com

Hi, I have a treeviewer with objects of some types, and some different
graphicalViewer. Some object can dnd to some graphicalViewer and some not.
During dnd I serialize my object. How can I make the rootEditPart deny dnd
if current object isn't allowed? I read on articles that rootEditPart must
understand the request to allow dnd, but I don't understand how make this...

Thanks
Re: Problem with dnd [message #182093 is a reply to message #181739] Sun, 22 May 2005 18:44 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Dragging between viewers is native drag and drop, not GEF dnd. So, requests
don't come into the picture unless you create and target them yourselves
(which you should). You should look at the dnd articles on eclipse.org. If
I remember correctly, during native DND, you don't know what's being dropped
until the drop actually happens. But you could get around this by storing
the dragged object in some field (the dragsource would set it when the drag
starts, and the drop listener would access it while the drag is happening).
Look at the EDiagram example (editor package): it does the same thing.

"Paolino Paperino" <paolino125@hotmail.com> wrote in message
news:d6i95a$26l$1@news.eclipse.org...
> Hi, I have a treeviewer with objects of some types, and some different
> graphicalViewer. Some object can dnd to some graphicalViewer and some not.
> During dnd I serialize my object. How can I make the rootEditPart deny dnd
> if current object isn't allowed? I read on articles that rootEditPart must
> understand the request to allow dnd, but I don't understand how make
this...
>
> Thanks
>
>
Previous Topic:Drag and Drop
Next Topic:Scrollable and fixed figures
Goto Forum:
  


Current Time: Fri Mar 29 01:46:32 GMT 2024

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

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

Back to the top