Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to set target decoration of connectors
How to set target decoration of connectors [message #644576] Mon, 13 December 2010 10:36 Go to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

i am using

List<Connector> sourceConnections = ViewUtil.getSourceConnections(this.getPrimaryView()); to get all outgouning conntectors of a node. Now I want to set a target decoration to some of the connectors depending on a attribute (navigable). How can I do this? The ConnectorImpl class has no such target decoration Attribute.

Ralph
Re: How to set target decoration of connectors [message #644585 is a reply to message #644576] Mon, 13 December 2010 11:31 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
To do so the following code can be applied in the NodeEditParts handle notification event:

List<DomainConnectionParticipantEditPart> sourceConnections = this.sourceConnections;
			
			for (int i = 0; i < sourceConnections.size(); i++)
			{
				ConnectionEditPart connection = sourceConnections.get(i);
				PolylineConnection connectionFigure = (PolylineConnection)connection.getFigure();
				connectionFigure.setTargetDecoration(new PolylineDecoration());
			}
Previous Topic:OpenEditPolicy, undo for raw EMF operations
Next Topic:Diagram partitioning, keep editor
Goto Forum:
  


Current Time: Fri Apr 26 20:20:28 GMT 2024

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

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

Back to the top