Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Changing Link target decoration programmatically
Changing Link target decoration programmatically [message #654094] Mon, 14 February 2011 08:10 Go to next message
Abhijit Gurav is currently offline Abhijit GuravFriend
Messages: 25
Registered: November 2010
Junior Member
Hi,

I tried to change Link target decoration programmatically, I have set target decoration using setTargetDecoration(..) method from linkFigure.

For first time when link is created, it's taking the decoration which I have set through method, but next time when I want different decoration, it's stick to the older one. I tried to refreshed the diagram by all means but no success. Confused

Any body having any clue on this.

Thanks in advance.

-AG



Re: Changing Link target decoration programmatically [message #654096 is a reply to message #654094] Mon, 14 February 2011 08:19 Go to previous messageGo to next message
Romain Bioteau is currently offline Romain BioteauFriend
Messages: 65
Registered: August 2009
Location: Grenoble
Member
Hi,
I think you have to set the decoration to null before adding a new one.

HTH
Romain


R&D Engineer at BonitaSoft
Re: Changing Link target decoration programmatically [message #654180 is a reply to message #654096] Mon, 14 February 2011 14:04 Go to previous messageGo to next message
Abhijit Gurav is currently offline Abhijit GuravFriend
Messages: 25
Registered: November 2010
Junior Member
Hi Romain,

Thxs a lot for reply, but I already tried this. But no success.

Any other way.

-AG
Re: Changing Link target decoration programmatically [message #654194 is a reply to message #654180] Mon, 14 February 2011 14:47 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

this code works for me in the handlenotificationEvent of a node:

ConnectionEditPart connection = sourceConnections.get(0);
				PolylineConnection connectionFigure = (PolylineConnection) connection
						.getFigure();
				connectionFigure.setTargetDecoration(new PolylineDecoration());


Did yoy try this for refreshing the edit part

performRequest(new Request(RequestConstants.REQ_REFRESH))


Ralph
Re: <Solved> Changing Link target decoration programmatically [message #654345 is a reply to message #654194] Tue, 15 February 2011 10:24 Go to previous message
Abhijit Gurav is currently offline Abhijit GuravFriend
Messages: 25
Registered: November 2010
Junior Member
Hi Ralph,

Thxs a lot for your reply. Smile

You are perfectly right.
I was also refreshing the links but after debug I got my issue while refreshing. I rectified the same and it's done Very Happy


-AG
Previous Topic:Continue connector lines
Next Topic:Linking question
Goto Forum:
  


Current Time: Thu Mar 28 17:47:27 GMT 2024

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

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

Back to the top