Wednesday, September 22, 2010

Re: RootLayoutPanel adds extra divs which makes it unusable. Why?

On Sep 22, 4:20 am, macagain <rgk...@gmail.com> wrote:
> Thomas-
> can you elaborate on what each's purpose is... I've been wondering
> about the diff... thanks!

As I said: RootLayoutPanel is a) a LayoutPanel that b) fills the
viewport, whereas RootPanel just takes an existing element and turns
it into an AbsolutePanel so you can add widgets into it.

RootPanel is great when:
- you have to integrate your app within defined bounds
(RootPanel.get("someElement")), for instance when the layout is
expressed in HTML+CSS directly in the host page's markup
- you want a "fluid" layout (RootPanel.get() just wraps the
document's body, so your app will happily grow or shrink beyond the
viewport, as inner widgets become bigger or smaller). GMail would be
an example (if it were made with GWT): the whole page scrolls when
either your left bar or your "main region" grows beyond the viewport's
height.

RootLayoutPanel is great when you want a "full page" app, similar to
Google Wave or Google Reader. You can then benefit from layout panels
without the need to maintain the "root" layout panel's size; but it
means each widget is "isolated": it won't affect the layout whichever
its size.

--
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+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