wiki:PromotSvgEditor

ProMoT Development Topic: Graphical Model Editor for ProMoT with SVG storage

(by Martin Ginkel)

Intro

Since 1998 ProMoT has a graphical editor made in Java, since 2000 we are using Graph Editing Framework (GEF). The graphical attributes are stored directly as attributes of the mathematical model, Symbols for modeling entities are stored as GIF-Images (Raster-Format).

There are several inconvenient effects of the current architecture:

  • It is difficult to extend the graphical attributes, because for every new thing a new storage syntax has to be invented in the MDL. MDL and Lisp have nothing to do with Graphics and these attributes just clutter the source code.
  • All graphics must be tied to modeling elements. This means additional graphics as explanation, legend or label are not allowed.
  • GIF-icons are a old-fashioned solution. They are not scalable, they are distributed as separate files, leading to problems when sending a model with icons to Coworkers. The Visual Explorer can use them in the zooming interface (ZUI) but with the bad side-effects of a zoomed-in raster graphics.

Proposal

As a new proposal it would be good to use SVG as storage for the graphics and just couple the graph-like model of the mathematical system (modules, terminals and links) to graphical elements of the diagram. All information about the layout and the graphical attributes are created and edited in the Java-GUI and stored to an SVG-fragment. This fragment is stored in a separate section of the source-code and referenced by the define-module and define-terminal commands.

Icons for module-instances in other model-classes are also created as SVG which can be by default a scaled version of the original view (automatic solution), but can also be reduced with a SVG-graphics editor (manual solution).

There are SVG-libraries available to allow rendering of graphics in Java, Batik. This would allow to integrate any graphics into Java-GUIs. There is a SVG-Editor freely available, GLIPS which could be used to edit graphics and specify graphical attributes. But this editor has no Graph-editing capabilities. There are graph-editors like JGraph that allow editing of graphs, but are much smaller as GEF and allow easy integration of other Swing or Java2D Components into the editor.

It could be also a good idea to use just ONE toolkit for the Visual Editor and the Visual Explorer, but in this case it must be possible to have a good graph-editor in Piccolo/GINY. Software which uses Piccolo as a zooming library have to build up its own graph editor. Some tools are listed below (all of them do not use GINY):

  • Spacetree, Novel node-link tree browser, Java 1.4+, free for non-commercial use
  • SHriMP, Simple Hierarchical Multi-Perspective, no editor, Java 1.x, ?
  • Simbrain, Building, running, and analyzing neural-networks, simple editor, Java 1.5+, ?
  • Anlan, Analytic Landscape tool, Java 1.x, ?
  • Kerika, Sharing documents, ideas and projects within distributed teams, simple editor, Java 1.x, commercial
  • Guess, Visualizing Zoomable Data Driven Graphs, simple editor, Java 1.4+, GPL

Another library which enables ZUI is ZVTM (ZGRViewer). It computes an SVG file containing a graphical representation of the graph from the GraphViz?'s DOT representation. Then the generated SVG file is parsed by the ZVTM's SVG import module and displayed to the user.

GEF should be dropped because it reimplements lots of things that are available in Java-2D.

Last modified 17 years ago Last modified on Sep 26, 2008, 1:15:01 PM