5

我需要根据特定输入创建流程图,使用 java 代码,什么是最好的方法\插件来实现这一点。

示例图

类似于上图(仅供示例,取自谷歌图片)

此外,图表在生成后应该是可编辑的。

4

4 回答 4

0

也许像https://github.com/jgraph/draw.io这样的东西可以解决你的问题。它是https://www.draw.io/的源代码,它是一个用于创建图表的图形编辑器。

因此,您可以创建一个 XML 文件并将其上传到您自己的 draw.io 版本并创建流程图。然后您可以对其进行编辑并将其保存为各种文件格式。

这不是完美的答案,但也许值得一试。

于 2017-05-08T14:38:39.803 回答
0

我会推荐Graphviz - 图形的行业标准。它还具有 Java API(以及 perl、python、ruby 等),因此可以在 Eclipse 中使用它。

它使用DOT - 一种纯文本图形描述语言。小例子:

 digraph graphname {
     a -> b -> c;
     b -> d;
 }

结果图:

有向图示例

Graphviz 提供了创建任何类型图形所需的一切。是的,图表是可编辑的。

Graphviz Eclipse 插件:https ://github.com/abstratt/eclipsegraphviz

于 2017-05-10T14:32:55.787 回答
0

我认为这个图书馆可能符合要求...

https://eclipse.org/modeling/mdt/?project=xsd#xsd

于 2017-05-10T20:44:22.740 回答
0

From the doc of JDiagram:

MindFusion.Diagramming for Java Swing (JDiagram for short) is a Java class library that that lets you create and display various types of diagrams and charts. The library includes model classes that describe the structure and appearance of a flow diagram, and view classes that can be integrated into any application that targets the Java Swing framework

here are the examples, of what you can achieve with the library:

http://www.mindfusion.eu/onlinehelp/jdiagram/

There you could browse the tutorials and the doc.

于 2017-05-09T22:34:11.513 回答