Search code examples
layoutcoordinatesvertexjung

Java - How to get coordinates of Vertex in a TreeLayout in JUNG?


Is there a way to get coordinates of a Vertex in JUNG using a TreeLayout, as there is no methods like getX and getY in Abstract Layout ?


Solution

  • Yes, there are such methods in AbstractLayout: http://jung.sourceforge.net/doc/api/edu/uci/ics/jung/algorithms/layout/AbstractLayout.html#getX(V)