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: 129
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 message
Andreas Graf is currently offline Andreas Graf
Messages: 129
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?
Previous Topic:Why graphiti is better than GEF
Next Topic:Enable injecting behavior objects in DiagramBehavior
Goto Forum:
  


Current Time: Sun May 26 05:14:52 EDT 2013

Powered by FUDForum. Page generated in 0.09282 seconds