Skip to main content



      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 08:52 Go to next message
Eclipse UserFriend
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 05:32 Go to previous messageGo to next message
Eclipse UserFriend
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 06:44] by Moderator

Re: ELK JavaFX port and self loop issue [message #1818013 is a reply to message #1816183] Wed, 04 December 2019 03:34 Go to previous message
Eclipse UserFriend
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: Tue May 13 07:04:33 EDT 2025

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

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

Back to the top