用于可视化类似流程图的 Java 图形库
我正在制作一个用于绘制流程图(本质上是电路图)的界面,其中包含如下所示的节点:
+-------+
in1 -->| |---> out1
| |
in2 -->| |
| |
in3 -->| |---> out2
+-------+
即每个框都有多个输入边和多个输出边。为了视觉清晰度,如果所有输入边缘都分组在一侧,所有输出边缘都分组在另一侧,则更有意义。
该界面将涉及用户将不同盒子的输入和输出连接在一起。
我正在尝试找到一个 Java 库,它可以帮助我轻松构建这样的界面,并且还具有自动布局工具来保持图表整洁。 http://www.jgraph.com/ 和 http://jung.sourceforge.net/ 看起来他们会做我需要的大部分工作,但我不确定是否使节点看起来像上面的输入并且输出聚集在一起。例如,我不知道如何与 JUNG 一起做到这一点。
任何人都可以建议应该使用什么库以及我可以做什么来使节点看起来像上面这样?
I'm in the process of making an interface for drawing flow chart like diagrams (essentially circuit diagrams) that contain nodes that look like the following:
+-------+
in1 -->| |---> out1
| |
in2 -->| |
| |
in3 -->| |---> out2
+-------+
i.e. each box has several input edges and several output edges. For visual clarity, it makes more sense if all the input edges are grouped on one side and all the output edges are grouped on the other.
The interface will involve the user connecting the input and outputs of different boxes together.
I'm trying to find a Java library that will help me build such an interface easily which will also have automatic layout tools for keeping the diagrams clean. http://www.jgraph.com/ and http://jung.sourceforge.net/ look like they'll do most of what I need but I'm not sure about making the nodes look like the above where inputs and outputs are clumped together. For example, I can't see how I could do this with JUNG.
Can anyone suggest what library and should use and what I can do to make nodes look like the above?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能还想考虑 yWorks - 它是用于 Java 应用程序图表的产品系列。我刚刚开始评估他们图表编辑器,还没有太多经验。
You might also want to consider yWorks - it is product family for diagramming for Java applications.. I just started to evaluate their diagram editor, not much experience on it yet.
我非常喜欢 AT&T 的 graphviz 。我不确定你是否会同意,但这值得考虑。
I like AT&T's graphviz a lot. I'm not sure that you'll agree, but it'd be worth considering.