Home arrow static arrow Java Programming [Archive] - Move Node in Drag and Drop
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Move Node in Drag and Drop
This topic has 2 replies on 1 page.

Posts:115
Registered: 4/16/03
Move Node in Drag and Drop  
Jul 30, 2004 5:58 AM



 
Thank you in advance for the help. I have a drap and drop working but it only copies the node that I am moving and not move the node. So, here is an example:

Parent1
Node1
Node2
Node3
Parent2
Node4
Node5
Node6

Say I "moved" Node 6 to Parent 1, what I have now gives me this:

Parent1
Node1
Node2
Node3
Node6
Parent2
Node4
Node5
Node6

But, I want this:

Parent1
Node1
Node2
Node3
Node6
Parent2
Node4
Node5

How do I get it to do that? Thank you.
 

Posts:569
Registered: 8/8/01
Re: Move Node in Drag and Drop  
Aug 1, 2004 11:15 PM (reply 1 of 2)



 
You have to remove the d&d'ed node from the parent-container. Therefore you can override the d&d-methods or you handle it with the mouselistener.

Of course, this listener must have access to the tree managing the node, to be able to manipulate it!

regards
 

Posts:115
Registered: 4/16/03
Re: Move Node in Drag and Drop  
Aug 2, 2004 6:39 AM (reply 2 of 2)



 
Thank you for responding....but can you show using some sort of code or be a little more clear on what you are talking about....or does anyone else have any ideas?

Thank you.
 
This topic has 2 replies on 1 page.