Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » TreeRouter Problem
TreeRouter Problem [message #165868] Wed, 19 December 2007 10:52 Go to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
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 #165967 is a reply to message #165868] Wed, 19 December 2007 16:36 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060700020705070600040605
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

St
Re: TreeRouter Problem [message #166081 is a reply to message #165967] Thu, 20 December 2007 10:30 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
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
Previous Topic:multiple creation tools mapping to a single domain element
Next Topic:Diagram Partition: in single editor
Goto Forum:
  


Current Time: Wed Apr 24 15:12:57 GMT 2024

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

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

Back to the top