Amios
Amios

Reputation: 61

Can you use Jung just for layouting purposes?

I have implemented a graphical system to visualize graphs in java. This system basically is founded on GEF/ZEST.

Now I want to enhance the functionality of the system by adding new possible layouts. Therefore I've taken a look around and stumbled over JUNG. Since I am not used to JUNG and just want to do a fast evaluation if JUNG suites my purpose, I came over here to ask people which know JUNG.

I want to use JUNG in the way, that I offer a graph as input, run some layout algorithms, get a final layout with position data and use my system to visualize the calculated layout.

Is JUNG suitable for that purpose?

Upvotes: 0

Views: 53

Answers (1)

Joshua O'Madadhain
Joshua O'Madadhain

Reputation: 2704

Yes, you can use JUNG to generate layout positions, and then you can programmatically interrogate the Layout instance that you create to get the position for each vertex: http://jung.sourceforge.net/doc/api/edu/uci/ics/jung/algorithms/layout/class-use/Layout.html

using the Layout.transform() method.

You may want to use the ShowLayouts demo to experiment with different layout algorithms for different graph types.

Upvotes: 1

Related Questions