Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic GetLink (Read 2912 times)
Silvia88
Full Member
***
Offline


I Love MindFusion!

Posts: 121
Joined: Aug 31st, 2015
GetLink
Sep 16th, 2015 at 1:54pm
Print Post  
Hi,
is it possible to get a link knowing its origin and its destination?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: GetLink
Reply #1 - Sep 16th, 2015 at 5:43pm
Print Post  
Hi,

Try this method:

Code
Select All
DiagramLink getLink(DiagramNode from, DiagramNode to)
{
	DiagramLinkList commonLinks = (DiagramLinkList)
		from.getOutgoingLinks().clone();
	commonLinks.retainAll(to.getIncomingLinks());
	return commonLinks.size() > 0 ?
		commonLinks.get(0) : null;
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Silvia88
Full Member
***
Offline


I Love MindFusion!

Posts: 121
Joined: Aug 31st, 2015
Re: GetLink
Reply #2 - Sep 17th, 2015 at 8:18am
Print Post  
ok, thank you very much  Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint