In the GEF shapes example, there are two types of connections, they differ by line style only (int Graphics.LINE_DASH or int Graphics.LINE_SOLID).
Now I wanna change the TargetDecoration (or rather set it to null) for one of them. How do I do this?
I’ve tried an if in the below method (below is the original), but it didn’t have any effect. I tried if (getCastedModel().getLineStyle() != Graphics.LINE_DASH) connections.setTargetDecoration(null) and left he rest as it was.
protected IFigure createFigure() {
PolylineConnection connection = (PolylineConnection) super
.createFigure();
connection.setTargetDecoration(new PolygonDecoration()); // arrow at
// target
// endpoint
connection.setLineStyle(getCastedModel().getLineStyle()); // line
// style
return connection;
}
Thanks!
The following code worked (changed the last two lines before the return):
This is the result:
Strange that this didn’t work for you…