DnD enablement [message #227966] |
Wed, 13 December 2006 13:10 |
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 22:01 |
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/
|
|
|
Powered by
FUDForum. Page generated in 0.03023 seconds