| TreeRouter Problem [message #165868] | 
Wed, 19 December 2007 05:52   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
This is a multi-part message in MIME format. 
--------------010405080004020208070909 
Content-Type: text/plain; charset=ISO-8859-1; format=flowed 
Content-Transfer-Encoding: 7bit 
 
Hi, 
i would like to use treeConnection in my diagrams. 
 
If everything works when my connection is drawn directly in the canvas,  
it is not the case inside another figure (a package for example). 
 
It seems it is the TreeRouter and especially the trunkLocation point  
that causes problems. 
 
Is anybody had this problem ? 
 
Thanks, 
 
--------------010405080004020208070909 
Content-Type: text/x-vcard; charset=utf-8; 
 name="stephane_bouchet.vcf" 
Content-Transfer-Encoding: 7bit 
Content-Disposition: attachment; 
 filename="stephane_bouchet.vcf" 
 
begin:vcard 
fn;quoted-printable:St=C3=A9phane Bouchet 
n;quoted-printable:Bouchet;St=C3=A9phane 
org:Obeo 
adr;quoted-printable:;;;Rez=C3=A9;;44400;France 
email;internet:stephane.bouchet@obeo.fr 
x-mozilla-html:FALSE 
version:2.1 
end:vcard 
 
 
--------------010405080004020208070909--
 |  
 |  
  | 
 | 
| Re: TreeRouter Problem [message #166081 is a reply to message #165967] | 
Thu, 20 December 2007 05:30   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
This is a multi-part message in MIME format. 
--------------000808060701090700050307 
Content-Type: text/plain; charset=ISO-8859-1; format=flowed 
Content-Transfer-Encoding: 8bit 
 
Hi, 
I finally found a solution : 
in BranchRouter Class, in getTrunkLocation(...) method, i modified the  
following line : 
Point ptTrunkLoc = getTree().getTrunkLocation(conn); // default; 
		 
by : 
Point ptTrunkLoc = conn.getTargetAnchor().getReferencePoint(); 
		conn.translateToRelative(ptTrunkLoc); 
		Point translated = getTree().getTrunkOrientation().getEdge( 
				conn.getTargetAnchor().getOwner().getBounds()); 
		boolean bTopDown = getTree().isTopDown(conn); 
		if (bTopDown) { 
			ptTrunkLoc = ptTrunkLoc.getTranslated(0, translated.y / 2); 
		}else { 
			ptTrunkLoc = ptTrunkLoc.getTranslated(0, -(translated.y / 2)); 
		} 
 
and now it is working.. 
 
Cheers ! 
 
St
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.58852 seconds