Skip to main content



      Home
Home » Eclipse Projects » GEF » Connections in Logic Editor Example
Connections in Logic Editor Example [message #29486] Sat, 12 October 2002 01:54 Go to next message
Eclipse UserFriend
Originally posted by: sy_cheung2.yahoo.com

In the Logic Editor example, if I have 2 Gates connectied and I move one of
the gate inside a Container (either FlowContainer or Circuit), the
connection will be relocated as well so the both gates remain connected. I
would like to know which part of the code in the example handling the
relocation of the *connection*?

And in another situation in which there are 2 gates within a Ciruit, and if
I move the Ciruit (the containing figure) inside another container (e.g. a
Flow Container), the connections between the 2 gates inside Ciruit stays
intact. I would like to know that is being handled also.

In my code, when move one end of the connection inside a container, the
connection will either not being reconnected or it is being connection to
(0, 0). I would like to know how to trouble shoot my problem.

Thank you.
Re: Connections in Logic Editor Example [message #29979 is a reply to message #29486] Sat, 12 October 2002 12:59 Go to previous message
Eclipse UserFriend
Try putting a breakpoint in your ConnectionRouter (NullConnectionRouter is the
default, but I don't know which router you're using) in the route() method. It
almost sounds like something is going wrong with the ConnectionAnchor (like
maybe there isn't one). When you hit the breakpoint, check to be sure the
connection's startAnchor and endAnchor are not null. You could also put a
breakpoint in PolylineConnection.anchorMoved(...) to make sure it's being
notified, but if it doesn't know about an anchor, it obviously won't get
notified of the move.

When a PolylineConnection is created, it gets 2 points by default, one at (0,0)
and one at (100,100). If you see one of your connections' endpoints in either
of these locations, it usually means it's missing an anchor or something went
wrong in the anchoring process.

Hope this helps.

Eric

"Sam Cheung" <sy_cheung2@yahoo.com> wrote in message
news:ao8c18$b70$1@rogue.oti.com...
> In the Logic Editor example, if I have 2 Gates connectied and I move one of
> the gate inside a Container (either FlowContainer or Circuit), the
> connection will be relocated as well so the both gates remain connected. I
> would like to know which part of the code in the example handling the
> relocation of the *connection*?
>
> And in another situation in which there are 2 gates within a Ciruit, and if
> I move the Ciruit (the containing figure) inside another container (e.g. a
> Flow Container), the connections between the 2 gates inside Ciruit stays
> intact. I would like to know that is being handled also.
>
> In my code, when move one end of the connection inside a container, the
> connection will either not being reconnected or it is being connection to
> (0, 0). I would like to know how to trouble shoot my problem.
>
> Thank you.
>
>
Previous Topic:info on GEF history
Next Topic:Add other SWT controls in the Palette?
Goto Forum:
  


Current Time: Tue Jun 17 00:50:25 EDT 2025

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

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

Back to the top