|Re: Hierarchical Layout and Active Status [message #557373 is a reply to message #556986]
||Tue, 07 September 2010 07:57
| Michael Wenz
Registered: July 2009
Location: Walldorf, Germany
Yes, this is indeed the exspected behavior. I have to admit that this might |
be somewhat confusing and that our documentation is not complete at this
The "active" flag for a pictogram element (PE) does not only control its
selectability but also influences layouting and drawing. Only active PEs are
actually drawn onto a diagram visualization (in GEF terms: an EditPart is
created), inactive ones are not present there. This means that they also do
not exists for layouting and positioning purposes. In fact merely all PEs
should be active (especially outer ones), inactive ones should be used for
structuring purposes only (e.g. for grouping the attributes of an EClass
In your case probably the outer ContainerShapes are also inactive, so all
PEs are not available in the diagram visualization on GEF level. This leads
then to the graphics algorithm (GA) objects being used for layouting. (BTW:
This is also the recommended way how to do visual structuring inside a
As soon as you set the inner PE to active, it exists in the graphical
visualization and is used for layouting. It's coordinate system is the one
of the next active PE parent. Inactive ones on the way to the top level
container are ignored. This means in your case that the diagram coordinate
system is used.
Hope this makes the behavior clearer...
"Rhett Hudson" <firstname.lastname@example.org> wrote in message
>I have an add feature that creates a structure like this:
> ContainerShape(Rectangle) -> ContainerShape(Rectangle) -> Shape(Rectangle)
> Where '->' indicates that the thing on the right is a child of the thing
> on the left and the thing in ()'s is the graphical algorithm.
> I'd like to make the layout feature of that last shape use coordinates
> relative to the location of the rectangle of its parent shape. Indeed,
> when the shape is inactive, that appears to be the behavior I see.
> However, that shape is also an anchor for connections. If I don't make it
> active, it isn't seen by the connection tool. But, when I make it active,
> it appears that I lose the relative coordinate system of the parent
> rectangle and it gets laid out using the root container's coordinate
> Is that the behavior I should expect? That layout changes depending on the
> active attribute?
Powered by FUDForum
. Page generated in 0.11461 seconds