GEF automatic Layout

725 Views Asked by At

I wrote an graphical Editor with GEF which is layouted with XYLayout. But now I have a Problem...

My GEF-Model referes to another Model (created by another perspective) I have, so the two models can differ from each other. The synchronisation form GEF-Model to second Model way is easy -> creating a new Modelelement when creating a GEF-Modelelement.

But the other way...

  1. Is there a way to auto-generate Figurepositions like in ZEST (without overlapping Elements or Connections) and have a graphical Editor that you can create more Elements? (Like Loading a Configuration)

  2. Is this auto-layouting also usable when a Editor with a Graph exists(after loading) and some Elements with Connections (the difference between the Models) should be added without overlapping Elements or Connections?

Thanks in advance

-DarkPhoenix-

1

There are 1 best solutions below

1
On

GEF does not deal with layout. It is up to YOU to handle it. You can probably plug a layout algorithm form Zest and use it to layout your diagram after a change is done on the external model.