简体   繁体   中英

How to set Vertex coordinates in Java JUNG?

I need to specify position of all graph's vertices. Is it possible? Please help.

If what you're saying is that you have existing vertex coordinates and you want to use those to lay out your graph in JUNG, that's what StaticLayout is for.

Classes in edu.uci.ics.jung.algorithms.layout used by edu.uci.ics.jung.visualization:

GraphElementAccessor : Interface for coordinate-based selection of graph components.

Layout : A generalized interface is a mechanism for returning (x,y) coordinates from vertices.

Described here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM