Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » DnD enablement
DnD enablement [message #227966] Wed, 13 December 2006 13:10 Go to next message
Eclipse UserFriend
Originally posted by: daniel-p.gmx.de

Hi all,

can anybody tell me how to forbid the drop of particular object types on
an EditPart. Here's the context: I have a tree, which shows nodes of
different types. Now I want to drag those nodes on my main EditPart. The
DnD already works. But now I'd like to forbit the drop on target side if
the draged node is of a certain type.

Thanks in advance,

Dan
Re: DnD enablement [message #228013 is a reply to message #227966] Wed, 13 December 2006 22:01 Go to previous message
Eclipse UserFriend
Originally posted by: daniel-p.gmx.de

Finally I found out the solution by myself, by overriding the
isEnabledMethod and then asking the Transfer to convert the events
currentDataType to Java.
The i can check the object using instanceof for a certain type.


> Hi all,
>
> can anybody tell me how to forbid the drop of particular object types on
> an EditPart. Here's the context: I have a tree, which shows nodes of
> different types. Now I want to drag those nodes on my main EditPart. The
> DnD already works. But now I'd like to forbit the drop on target side if
> the draged node is of a certain type.
>
> Thanks in advance,
>
> Dan



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Previous Topic:Centered, fixed-sized diagram with correctly positioned grid and rulers
Next Topic:the problem of ZoomIn or ZoomOut button display in coolbar when open a editor.
Goto Forum:
  


Current Time: Fri Dec 19 15:57:18 GMT 2014

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

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