Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Custom connection
Custom connection [message #1759733] Mon, 17 April 2017 20:07 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Hi,

I am trying to create a connection similar to this one
http://i.imgur.com/v9UKcKh.png

This connection is static in a sense that as two connected objects move, either the height of left and right vertical lines change or the horizontal line between them does. This was done in GEF editor with custom router.

The closest connection I saw in Graphiti is CurvedConnection. However, it does not work in my case because as position of connecting object changes, so does the shape of the curve (bezier curve) - in my case it always needs to be a quadrilateral with 90 degree angles.

What can I use/write to create connection that I need?

Thanks,
Alex

[Updated on: Tue, 18 April 2017 13:47]

Report message to a moderator

Re: Custom connection [message #1760349 is a reply to message #1759733] Wed, 26 April 2017 08:28 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Alex,

Graphiti does not offer the option to hook in a custom router. I would propose to use a Freeform Connection for that and create the required bendpoints directly on creation of that connection. On moving any of the shapes you would then need to adapt the positions of the bendpoints accordingly.

Additionally you might want to disable the option for the user to move and add/remove bendpoints; to achive that you would need to disable the DefaultMoveBendpointFeature, DefaultAddBendpointFeature and DefaultRemoveBendpointFeature by returning null in your feature provider for those connections.

Michael
Re: Custom connection [message #1760403 is a reply to message #1760349] Wed, 26 April 2017 16:47 Go to previous message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Thanks Michael.
Previous Topic:Loading images
Next Topic:Toolbar actions
Goto Forum:
  


Current Time: Sat Jul 27 15:08:49 GMT 2024

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

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

Back to the top