KWJ2104
KWJ2104

Reputation: 2009

working with JUNG library

I'm currently trying to use the jung library (http://jung.sourceforge.net) to draw a directed graph of nodes and vertices. I have a few questions on some issues I have a hard time finding the answer to in the documentation:

  1. How do you check whether a vertex exists on a graph or not?

  2. How do you turn off labels for edges in the actual displaying of the graph?

  3. When I am adding vertices on a DirectedSparseMultiGraph, they all tend to form a circle formation. Since I am trying to add over 100 nodes, I would like to spread them out somehow.

Thanks

Upvotes: 0

Views: 367

Answers (1)

Joshua O'Madadhain
Joshua O'Madadhain

Reputation: 2704

(1) Graph.containsVertex()

(2) Don't provide edge labels if you don't want them. PluggableRendererContext controls many aspects of visualization; see the methods for providing edge labels.

(3) What layout are you using? JUNG has a number of different ones.

Upvotes: 2

Related Questions