I am trying to create a connection similar to this one
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?
Michael Wenz Messages: 1887 Registered: July 2009 Location: Walldorf, Germany
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.