Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Adding Custom Connections(Defining new custom connections)
Adding Custom Connections [message #781560] Sat, 21 January 2012 17:01 Go to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
Messages: 130
Registered: November 2011
Senior Member
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 #781585 is a reply to message #781560] Sat, 21 January 2012 18:17 Go to previous messageGo to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
Messages: 130
Registered: November 2011
Senior Member
OK i already got it.
Thread can be closed.
Re: Adding Custom Connections [message #783988 is a reply to message #781560] Thu, 26 January 2012 22:07 Go to previous message
Fabian Steeg is currently offline Fabian SteegFriend
Messages: 76
Registered: July 2009
Member
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);
Previous Topic:[zest] Highlightcolor not used when providing own figures
Next Topic:Why all connection routers do translateToRelative when routing?
Goto Forum:
  


Current Time: Fri Apr 26 17:13:26 GMT 2024

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

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

Back to the top