Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Coordinates of Connection Decorators
Coordinates of Connection Decorators [message #1019330] Fri, 15 March 2013 13:07 Go to next message
Andreas Graf is currently offline Andreas GrafFriend
Messages: 211
Registered: July 2009
Senior Member
Hi,

is it possible to get the absolute coordinates of a ConnectionDecorator? Decorator returns a location as double, which is a percentage of the line length. But I would like to get the actual x,y-coordinates.

Any help is appreciated.

Andreas

[Updated on: Fri, 15 March 2013 13:07]

Report message to a moderator

Re: Coordinates of Connection Decorators [message #1019334 is a reply to message #1019330] Fri, 15 March 2013 13:16 Go to previous messageGo to next message
Andreas Graf is currently offline Andreas GrafFriend
Messages: 211
Registered: July 2009
Senior Member
I suspect from the default move connection decorator feature that the ga might hold the coordinates. I was trying the following in acreate feature:

decorator.setLocation(0.5);
getDiagramEditor().refreshRenderingDecorators(splitConnection);
System.out.println("!!!!!! "+xsrcGa.getX());

decorator.setLocation(0.01);
getDiagramEditor().refreshRenderingDecorators(splitConnection);
System.out.println("!!!!!! "+xsrcGa.getX());

And the X coordinate did not change. When is it refreshed?
Re: Coordinates of Connection Decorators [message #1106871 is a reply to message #1019330] Wed, 11 September 2013 16:58 Go to previous message
Abdelilah ELANBARI is currently offline Abdelilah ELANBARIFriend
Messages: 1
Registered: September 2013
Junior Member
Hi,
I've the same request about getting the exact absolute coordinates of a text connection decorator. Could you have an answer to your request?

Getting the connection midpoint location and then translating using the coordinates returned by the graphic algorithm does not seem to give the same coordinates than the actual ones on the screen..

Thanks in advance
Abdelilah
Previous Topic:How to connect 2 elements created out of same Eobject to different pictogramelements
Next Topic:Graphiti for web development
Goto Forum:
  


Current Time: Thu Apr 25 09:28:29 GMT 2024

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

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

Back to the top