|Create PictogramLink for Diagram object itself. [message #735558]
||Wed, 12 October 2011 03:59
| Georg Hackenberg
Registered: October 2011
Dear Graphiti community,|
I have been working on a graphical editor for an EMF model for some days now. The goal is to support creating and editing models of automata (containing states and transitions). So far, adding states and transitions to the diagram works fine. Now, the states need to be contained within an automaton object. The idea was to link the diagram itself with the automaton object.
The question is where and how to do that naturally inside the Graphiti framework. For example I could imagine overwriting the method creating new diagram objects and automatically adding the automaton object so that each new diagram is linked directly. Another idea I had was to provide a utility class that retrieves the automaton object from the diagram - and creates respectively links the both if necessary. Then I could call this method where ever I need the automaton object and the automaton object is created on the fly the first time.
I would be grateful to hear some other opinions on this. Maybe there is also a built-in mechanism to support this use case.
Powered by FUDForum
. Page generated in 0.01701 seconds