Saturday, September 1, 2012

Re: fundamental problems with predictive layout

you have to call force layout to calc sizes in the new space. 

k

Sent from my iPhone

On Sep 1, 2012, at 6:09 PM, Magnus <alpineblaster@googlemail.com> wrote:

Hi,

since I use GWT I have a fundamental problem with implementing a predictive layout. I did many resize operations using the onResize method. This method is called whenever a widget is resized. This is fine.
However, it is only possible to react on a resize event if one knows the new sizes!!

Consider a composed widget, with an outer panel and some child widgets. In order to resize the child widgets, I need to know the actual size of the outer panel. But this size is not known in most cases.
In almost every onResize method I was not able to detect the *new* size of the object being resized. Calling getOffset[Width|Height] nearly always results in wrong sizes, old sizes.

One method to deal with this is to schedule the onResize code after the current events are processed. But these retarded resizing codes cascade, when there are composite widgets that must delegate the resize event to their children. And cascading this stuff makes it slow.

So given a composite widget, with a horizontal fixed (left) component, and a variable (right) component: How can you make this resizable?

Thanks
Magnus

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/2uqreZcZNCwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment