Is there any standard solution for drawing polyline with arrow at the end?
I would like to visualise direction of connection between two elements in diagram.
Now I create just polyline:
Connection connection = peCreateService.createFreeFormConnection(getDiagram());
connection.setStart(addConContext.getSourceAnchor());
connection.setEnd(addConContext.getTargetAnchor());
---
I would like to add something like small triangle at the end of polyline, so it would look like arrow. Triangle must synchronize its position and angle to polyline shape.
I could not find any simple solution yet, had anyone done something similar in graphiti diagram?
Michael Wenz Messages: 1272 Registered: July 2009 Location: Walldorf, Germany
Senior Member
You should use ConnectionDecorators for that purpose. Please see the
TutorialAddEReferenceFeature class in the Graphiti Tutorial for details
(methods add and createArrow).
Is there any standard solution for drawing polyline with arrow at the end?
I would like to visualise direction of connection between two elements in
diagram.
Now I create just polyline:
Connection connection =
peCreateService.createFreeFormConnection(getDiagram());
connection.setStart(addConContext.getSourceAnchor());
connection.setEnd(addConContext.getTargetAnchor());
---
I would like to add something like small triangle at the end of polyline, so
it would look like arrow. Triangle must synchronize its position and angle
to polyline shape.
I could not find any simple solution yet, had anyone done something similar
in graphiti diagram?