Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » DnD enablement
DnD enablement [message #227966] Wed, 13 December 2006 08:10 Go to next message
Eclipse User
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 17:01 Go to previous message
Eclipse User
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: Thu Jul 31 13:53:26 EDT 2014

Powered by FUDForum. Page generated in 0.06214 seconds