Skip to main content



      Home
Home » Eclipse Projects » GEF » hit testing on drop in container nodes
hit testing on drop in container nodes [message #76261] Tue, 22 April 2003 17:51 Go to next message
Eclipse UserFriend
Originally posted by: jwoods.journee.com

I've got a node object that has within it other objects, each of which has a
model, figure, and edit part. I've currently got the ability to drag and
drop those children between multiple nodes. What I would also like to do
however is to be able to graphically reorder the children within the node
via the same drag and drop mechanism.

I can get the location of the drop from the request that my node's
ContainerEditPolicy receives, but what bit of magic (is there any?) do I
need to do to turn that location into a child editpart (Once I know what
child they dropped on I can get the order from there)? I tried the viewer's
findObjectAt() method, but that only seems to give back the parent node. Do
I just have to brute force it and write my own lookup code?

Thanks,

- Jason
Re: hit testing on drop in container nodes [message #76279 is a reply to message #76261] Tue, 22 April 2003 18:10 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Have you seen the "flow container" in the Logic example?
The brains for this are in FlowLayoutEditPolicy. It calculates an index
based on mouse point, or something like that.

"Jason Woods" <jwoods@journee.com> wrote in message
news:b84d0g$v0r$1@rogue.oti.com...
>
> I've got a node object that has within it other objects, each of which has
a
> model, figure, and edit part. I've currently got the ability to drag and
> drop those children between multiple nodes. What I would also like to do
> however is to be able to graphically reorder the children within the node
> via the same drag and drop mechanism.
>
> I can get the location of the drop from the request that my node's
> ContainerEditPolicy receives, but what bit of magic (is there any?) do I
> need to do to turn that location into a child editpart (Once I know what
> child they dropped on I can get the order from there)? I tried the
viewer's
> findObjectAt() method, but that only seems to give back the parent node.
Do
> I just have to brute force it and write my own lookup code?
>
> Thanks,
>
> - Jason
>
>
Previous Topic:problems with connection
Next Topic:Feedback on connection anchors
Goto Forum:
  


Current Time: Sun May 11 08:26:53 EDT 2025

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

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

Back to the top