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 09:07 Go to next message
Andreas Graf is currently offline Andreas Graf
Messages: 151
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 09:07]

Report message to a moderator

Re: Coordinates of Connection Decorators [message #1019334 is a reply to message #1019330] Fri, 15 March 2013 09:16 Go to previous messageGo to next message
Andreas Graf is currently offline Andreas Graf
Messages: 151
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 12:58 Go to previous message
Abdelilah ELANBARI is currently offline Abdelilah ELANBARI
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 Aug 21 00:38:53 EDT 2014

Powered by FUDForum. Page generated in 0.02860 seconds