[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: Location of child parts in container
|
Your anchor should derive the location when it is asked getLocation. If you
do it any sooner, the figures aren't in the correct place. For performance
reasons, layouts only occur hopefully once and in the order of depencies,
such as connections depending on their nodes.
"Barry Lay" <blay@xxxxxxxxxxxxxxxxxxx> wrote in message
news:cogrs1$flo$1@xxxxxxxxxxxxxxxxxx
> I have an EditPart which uses a LabeledContainer and which accepts parts
> that are Labels, using ToolbarLayout to position them vertically. I
> would like to put ConnectionAnchors on the sides of the container that
> line up with the contained parts. I thought to do this in
> refreshChildren for the container but I can't figure out how to get the
> actual location of the children. I have tried traversing the child
> EditParts and the children of the LabeledContainer Figure but getBounds
> always returns the same unhelpful values. I thought to try
> translateToParent but that seems to be hardwired to do nothing. Is this
> method too early to get the rendered location? It seems to run after
> refreshVisuals.
>
> Thanks.