Adding Custom Connections [message #781560] |
Sat, 21 January 2012 12:01  |
Eclipse User |
|
|
|
Hello,
today i tried a little bit with Zest and already got it working really well.
Here is a code snippet i used to draw a simple connection between two nodes.
GraphNode node1 = new GraphNode(graph, SWT.NONE, "Jim");
GraphNode node2 = new GraphNode(graph, SWT.NONE, "Jack");
new GraphConnection(graph, ZestStyles.CONNECTIONS_DIRECTED, node1,
node2);
Doing this draws me a directed edge with a filled closed arrow.
In my Use Case i need both , directed edges with filled closed arrow, and directed edges with closed (non-filled) arrow.
Can i define my one connections in any way ?
Thanks
|
|
|
|
Re: Adding Custom Connections [message #783988 is a reply to message #781560] |
Thu, 26 January 2012 17:07  |
Eclipse User |
|
|
|
I don't know if this is the easiest way, but you could set the target decoration of the connection figure, like this:
Connection figure = graphConnection.getConnectionFigure();
PolygonDecoration decoration = new PolygonDecoration();
decoration.setFill(false);
((PolylineConnection) figure).setTargetDecoration(decoration);
|
|
|
Powered by
FUDForum. Page generated in 0.28256 seconds