[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [albireo-dev] SWT size/layout management
- From: Bruno Haible <haible@xxxxxxx>
- Date: Mon, 11 Feb 2008 23:00:22 +0100
- Delivered-to: firstname.lastname@example.org
- Organization: ILOG
- User-agent: KMail/1.9.1
Gordon Hirsch wrote:
> The controlResized() method is called as part of the setBounds()
> implementation, which means it can be (indirectly) triggered by a call
> to layout(). controlResized() is also called as a result of a
> user-initiated resize.
Thanks, that answers it. It's the event that denotes that the SWT control
has been resized (or is being resized).
Whereas in our case, we want an event that denotes that when computeSize()
will be called the next time, it will return a different result than
This is a different kind of notification; calling it 'controlResized'
will probably lead to confusion. I'll think of another name... maybe
> I can imagine layout() being called from a ControlListener if it is
> necessary for an application to synchronize the sizes of multiple
> widgets under its control, or if a composite widget needs to synchronize
> the sizes of its child widgets.
Yes, and when a ControlListener calls layout(), it needs to take care
not to go into an infinite recursion. In our case, such infinite recursion
is not possible: 'controlShouldBeResized' can invoke 'layout' which will