On Tue, Apr 17, 2012 at 03:27, stagirus <mohanam...@gmail.com> wrote:
> Are you saying, the so called LayoutPanels in GWT 2.X are not compatible
> with the ubiquitous GWT panels such as VerticalPanel? This implies there
> were some design flaws in non-layout panels. Rather than fixing the design
> limitation in older panels, GWT team has introduced a separate layout panel
> design. This is sad because it must be a totally painful process to upgrade
> the older panels into new LayoutPanels?

The are compatible to a certain extend, but the underlying technology
they use are totally different.
The API of the new LayoutPanels and old Panels are very similar, so in
most cases it really is just changing the class you use that's all.

These layout panels place whatever that are inside them absolutely,
i.e., they use position: absolute and left, right, top, bottom in
order to display correctly. The advantage of this is that there's no
need for the JavaScript to interfere when the size of the window
changes and the underlying browser will take care of all of that and
in return, the performance much much better. The drawback, however, is
that all widget's size will need to be specified, you can no longer
say: I want the north to auto expand with the widget that's inside it,
instead, you can only do: the maximum size of the north is 100px, if
what's inside it is bigger, it'll need to scroll.

The reason they can't simply "fix" the old panel is that it'll break
backward compatibility, and the new layout panels won't work in quirks
mode, so I think their decision to introduce new implementations and
get the uses to make concious decisions on the switch is a good one.

> For the SplitLayoutPanel to acquire size information, will it be sufficient
> to make just the parent panels including RootLayoutPanel to be LayoutPanels?
> I suppose the child widgets could be non-layout panels, right?

That is the idea. To put it in simple terms, you can put widgets that
doesn't implement RequiresResize in LayoutPanels, but LayoutPanels
will have to be inside widgets that implements ProvidesResize, it's as
simple as that. :)

> GWT shows that HorizontalSplitPanel and VerticalSplitPanel as deprecated. Do
> they work well in standards mode? I am not sure these panels support our
> requirements either.

Good point, they may not work in standards mode. As I said in my
previous email, if you can simply switch everything to layout panels,
do that; If not, implement a custom Container widget that implements
ProvidesResize and calls the LayoutPanel's onResize() when it's
attached to the DOM tree and is visible.

Hope it helps.

-- Joe

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

Reply via email to