Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Drag and Drop
Drag and Drop [message #134420] Tue, 23 September 2003 11:20
Eclipse UserFriend
Originally posted by: yohai.attunity.co.il

Good morning,
I've implemented a drag & drop feature and i have a problem with the mthod
supportDrop().
I understand that i should implement two supportDrop methods inside the drop
target class. The first one is supportDrop() and the second is
supportDrop(Object).
The first one, without the parameters, is invoked whenever i drag an object
and hover above the target object. The second one is inviked when i try to
actually drop the dragged object (meaning - stop holding down the mouse
button).
The problem - i want to add a condition to the first method supportDrop so
that it will return true if and only if the dragged node (i'm dragging
objects in a tree) is of the same type as the children of the target node.
for eample, i'd like to code somethinf like that -

public boolean supportdrop() {
return
(draggedNode.getParent().getClass().equals(targetNode.getCla ss()));
}

but i don't know how can i get the dragged node! I can't get it by the
getSelection() because while dragging an object and moving with the mouse,
the selection is lost. Also - I don't know how to get the target node.
Please help me...




____________________________________________________________ ______ yohai
ICQ#: 81309797 Current ICQ status: + More ways to contact me
____________________________________________________________ ______
Previous Topic:Cannot find Progress Indicator in 3.0 M3
Next Topic:Windows 2000 Domain User Folder rights
Goto Forum:
  


Current Time: Sat Jun 07 17:52:09 EDT 2025

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

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

Back to the top