| [news.eclipse.tools.gef] Re: Correct Layout Procedure? |
Hi there,
I have a situation where I have a container (A) that has children (B), each of which has children of its own (C). The container (A) resides in a document which has an XYLayout, so when A is asked to refresh visuals, I call setLayoutConstraint on the parent with the preferred size. However, does this preferred size need to be calculated manually from the children (B)? Likewise, when each of the children (B) is in refreshVisuals, do they need to set a preferred dimension calculated manually using the sizes of their children (C)?
What's the correct way to do this? I'm wondering if GEF handles this for me, because right now I'm doing a bunch of calculations with insets and children's edit parts' figures' sizes and whatnot. Basically I want A to be large enough to accomodate all of the figures of B, which are each in turn large enough to accomodate all of the figures of C, which are each sized on the basis of a model constraint. Thanks in advance.
- Daniel