سؤال

How can i get the coordinates of my vertices in my graph after it is laid-out?,i'm using JUNG for creating and laying-out the graph

هل كانت مفيدة؟

المحلول

For layout of type jung.algorithms.layout.AbstractLayout or any subclass, you can call layout.getX(vertex) and layout.getY(vertex). vertex is your vertex, whatever type you have chosen.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top