|Re: parent element and child element relationship in graphiti [message #1062255 is a reply to message #1062138]
||Thu, 06 June 2013 18:19
| Hallvard Traetteberg
Registered: July 2009
Location: Trondheim, Norway
This depends on what you really asking for. A graphiti editor normally
works by creating one or more diagram elements for each underlying model
element. This is done using add features, like what Andre suggested.
This code then ensures that child shapes for a child model element is
inserted into the parent shape for the parent model element. The
activation of add features can be triggered/called in several ways:
- from a create feature, to ensure a shape is created for a new model
- from an update feature, to ensure a shape is created for a more
element (that somehow appeared)
- from an add feature, usually for the parent, to ensure shapes for all
children are created
If you want to create model elements (automatically), you use create
features, but these are normally triggered by user actions, e.g.
dragging an element from the palette etc.
Hope this helps.
On 06.06.13 00.56, abdallah qoraan wrote:
> hey Andre,
> 1st of all thank you for your fast reply and for your help :) what am
> trying to say when i create the parent element, the child-elements
> should be embedded and created by default inside the container-shape of
> the parent.
> in my project the parent element should have exactly one of each
> child-element types and i have 3 types of child-element.
> any idea :) ?
Powered by FUDForum
. Page generated in 0.02106 seconds