Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » ELK JavaFX port and self loop issue(Issue with positioning of elk ports on the node)
ELK JavaFX port and self loop issue [message #1815099] Wed, 25 September 2019 12:52 Go to next message
Sumesh Kannankatil Sadanandan is currently offline Sumesh Kannankatil SadanandanFriend
Messages: 4
Registered: September 2019
Location: Stuttgart
Junior Member
Hello Experts,

I am using JavaFX for graphical visualization of my model and in this regard for layout I am using ELK LayeredLayout.

I am facing issue with the alignment and positioning of ELK ports on the node in my JavaFX diagram. I see that coordinates which are obtained from ELK API w.r.t. position of Port are not proper and this is resulting in misalignment of Node, Edge, Ports in my JavaFX diagram.

Is there some property which I should use in order to get the ports on the node?

Please have a look at the attached screenshot of the JavaFX diagram which I generate using ELK for positioning of the elements: index.php/fa/36395/0/

Also as a reference I am attaching a java project which has JavaFX UI and uses ELK for Layout related information

In case if any of you have encountered similar issues, please support me regarding this topic.

Thanks in Advance !!
Re: ELK JavaFX port and self loop issue [message #1816183 is a reply to message #1815099] Wed, 23 October 2019 09:32 Go to previous messageGo to next message
Sumesh Kannankatil Sadanandan is currently offline Sumesh Kannankatil SadanandanFriend
Messages: 4
Registered: September 2019
Location: Stuttgart
Junior Member
Hello friends!!
Since this issue was not solved I continued to dig deeper and now I have come up with a solution.

The mistake I did was I directly used ElkPort.layoutX() and ElkPort.LayoutY() for aligning the position of the ports. Instead the port positions were with respect to the parent node coordinates.

index.php/fa/36618/0/

By using the following I was able to successfully position the port.
rectangle.setLayoutX(parentNode.getX()+elkPort.getX());
rectangle.setLayoutY(parentNode.getY()+elkPort.getY());


[Updated on: Wed, 23 October 2019 10:44]

Report message to a moderator

Re: ELK JavaFX port and self loop issue [message #1818013 is a reply to message #1816183] Wed, 04 December 2019 08:34 Go to previous message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Sumesh Kannankatil Sadanandan wrote on Wed, 23 October 2019 09:32
The mistake I did was I directly used ElkPort.layoutX() and ElkPort.LayoutY() for aligning the position of the ports. Instead the port positions were with respect to the parent node coordinates.


Indeed. The coordinate system is documented here.

Many apologies for not replying in time, but I wanted to leave this link here for others to find.
Previous Topic:Incremental layout
Next Topic:Same level of nodes
Goto Forum:
  


Current Time: Thu Sep 19 04:00:55 GMT 2024

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

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

Back to the top