I wrote a small graph visualizer class:
public void simpleGraph(SparseMultigraph<Vertex,SEdge> graph, String name) { Layout<Vertex, SEdge> layout = new ISOMLayout(graph); layout.setSize(new Dimension(800,800)); BasicVisualizationServer<Vertex, SEdge> vv = new BasicVisualizationServer<Vertex, SEdge>(layout); vv.setPreferredSize(new Dimension(850,850));
How to add labels for vertices and edges? Values ββare stored in my own vertex class. Can I iterate over all the vertices in the layout or BasicVisualizationServer and add labels?
Thank you for your help!
java graph jung visualizer
Martin preusse
source share