Skip to main content



      Home
Home » Eclipse Projects » GEF » Snap in the logic and flow examples
Snap in the logic and flow examples [message #140338] Mon, 28 June 2004 01:17 Go to next message
Eclipse UserFriend
I'm trying to use the snap to geometry feature much like it is implemented
in the GEF logic and flow examples. I have a certain EditPart that I want
to snap when the connection tool is active (e.g. when I am connecting
items and the cursor gets close to something of this type of edit part, I
want to snap to that object).

It seems in the logic and flow examples that this is the functionality for
the connect tools. However, in searching these code package trees, I find
no reference to the word 'snap'.

Can someone point me in the right direction please? If you could respond
via e-mail as well as post that'd be great.

LFW
Re: Snap in the logic and flow examples [message #140473 is a reply to message #140338] Mon, 28 June 2004 14:52 Go to previous message
Eclipse UserFriend
I think you are confusing Snap To Geometry (it's not available in the flow
example) with something else. Creation tools snap to the closest anchor
point once a target editpart has been set. They invoke
getTargetConnectionAnchor(Request) -- declared on NodeEditPart -- to
determine the closest anchor and snap to it (if there is one). In the case
of the logic and flow examples, the target is only known once you enter that
part's bounds (i.e., when you are on it, not close to it). If you want to
snap when you are close to an editpart, you would have to somehow set the
target editpart when one is in close proximity.

"Larry Waldman" <lfw@andrew.cmu.edu> wrote in message
news:cbo9kn$8g2$1@eclipse.org...
> I'm trying to use the snap to geometry feature much like it is implemented
> in the GEF logic and flow examples. I have a certain EditPart that I want
> to snap when the connection tool is active (e.g. when I am connecting
> items and the cursor gets close to something of this type of edit part, I
> want to snap to that object).
>
> It seems in the logic and flow examples that this is the functionality for
> the connect tools. However, in searching these code package trees, I find
> no reference to the word 'snap'.
>
> Can someone point me in the right direction please? If you could respond
> via e-mail as well as post that'd be great.
>
> LFW
>
Previous Topic:RE: delete an editPart
Next Topic:Figures with Hint Sensitive Sizes
Goto Forum:
  


Current Time: Wed Jul 23 10:06:52 EDT 2025

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

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

Back to the top