使用 Java 进行树可视化

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7108287/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 18:40:08  来源:igfitidea点击:

Tree Visualisation with Java

javagraphtree

提问by Johannes

I am looking for a libary to generate Graphs or Trees like Organizations Charts. This library should be able to generate plain Images from this graphs.

我正在寻找一个库来生成图形或树,如组织图表。这个库应该能够从这个图中生成普通图像。

Does anyone knows a good, hopefully open source, library for Graph Visualization?

有谁知道一个好的,希望是开源的图形可视化库?

采纳答案by Reverend Gonzo

JGraphis probably your best bet.

JGraph可能是您最好的选择。

It's an extremely powerful open-source graph visualization library.

它是一个非常强大的开源图形可视化库。

回答by Terran

Graphstream Project looks incredible and is open source. The best about it, it's not Swing based:

Graphstream 项目看起来不可思议并且是开源的。最棒的是,它不是基于 Swing 的:

Graphstream Project

图流项目

Github Link

Github 链接

Graph graph = new SingleGraph("Tutorial 1");
graph.setStrict(false);
graph.setAutoCreate(true); // optionally have it create nodes for you automatically
graph.addEdge("AB", "A", "B");
graph.addEdge("BC", "B", "C");
graph.addEdge("CA", "C", "A");
graph.display();

enter image description here

在此处输入图片说明

Or a tree:

或者一棵树:

enter image description here

在此处输入图片说明

回答by Mouna Cheikhna

Check these libraries :

检查这些库: