Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » ConnectionAnchor doesn't refresh
ConnectionAnchor doesn't refresh [message #181212] Mon, 07 April 2008 10:45 Go to next message
Eclipse UserFriend
Originally posted by: taggartboy.hotmail.com

Hello,

I have a probelm in my diagram in that once a figure grows by placing
another child in it's compartment, the connection attached to the bottom
of the figure does not refresh to the new location of the bottom of the
figure.

I am using custom Overrides for the setTarget and setSource connection
anchors in the edit part classes of the parent figure and a custom layout
manager for the compartment and it's parent.

Anyone experience this or have any ideas how i might solve this?

Cheers
Peter.
Re: ConnectionAnchor doesn't refresh [message #183420 is a reply to message #181212] Thu, 17 April 2008 08:40 Go to previous message
Eclipse UserFriend
Originally posted by: taggartboy.hotmail.com

I found the solution to this, so for anyones future reference I was using
a custom connection router which extends ObliqueRouter and implements
OrthogonalRouter. I wrote a custom routeline metod to make the line avoid
any of the shapes in the diagram and follow a predetermined course.

In the routeline metod i was placing points using this for the start point:

Point r1 = conn.getSourceAnchor().getReferencePoint();
conn.translateToRelative(r1);

So instead I changed it to use:

Point Pos = conn.getSourceAnchor().getOwner().getBounds().getBottom();

which basically returns the same co-ordinates as my
getSourceConnectionAnchor methods overriden in the editpart.

And so it seems that removing the translateToRelative call on the first
point stopped the source connection anchor being placed incorrectly when
the shape that the connection was attached to changed bounds vertically.

Well, If anyone else sees the same problem, I hope this helps you.

Peter.
Previous Topic:Label font color
Next Topic:Invalid Connection reference when compartments are used
Goto Forum:
  


Current Time: Sun Aug 31 07:41:26 EDT 2025

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

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

Back to the top