开发者

How to generate editable drawing of connected shapes in Java

开发者 https://www.devze.com 2023-04-09 06:16 出处:网络
Can anybody tell me how I could do the following: I want my Java code to generate a drawing that has multiple connected shapes.Perhaps hundreds of shapes--not huge.I\'d like to generate this and save

Can anybody tell me how I could do the following:

I want my Java code to generate a drawing that has multiple connected shapes. Perhaps hundreds of shapes--not huge. I'd like to generate this and save it as a standard file format that somebody could open in a viewer or an editor. I do not want to implement viewing or editing logic--generation only.

I'd like the user to be able to take my generated file, open it in a WYSIWYG editor, and move the shapes around with the lines that connect the shapes staying connected to the shapes as they move. Tha开发者_如何转开发t way, my generation code does not have to be super smart about making sure that connectors don't overlap.

Can anybody suggest a combination of file format, Java library, editor (or some subset of those three) that would work well for this task?

Thoughts so far:

  1. yEd allows this editing behavior and uses graphml as the format. However, I'm not sure how widely used graphml is, and I'm concerned about availability of glyphs.

  2. Inkscape and SVG are widely used, but I'm a complete novice, and so far I haven't been able to get lines to stay connected to other shapes using Inkscape when I move them around.

I'm open to other options...

0

精彩评论

暂无评论...
验证码 换一张
取 消