public class

RootLayoutPanel

extends LayoutPanel
java.lang.Object
   ↳ com.google.gwt.user.client.ui.UIObject
     ↳ com.google.gwt.user.client.ui.Widget
       ↳ com.google.gwt.user.client.ui.Panel
         ↳ com.google.gwt.user.client.ui.ComplexPanel
           ↳ com.google.gwt.user.client.ui.LayoutPanel
             ↳ com.google.gwt.user.client.ui.RootLayoutPanel

Class Overview

A singleton implementation of LayoutPanel that always attaches itself to the document body (i.e. get()).

This panel automatically calls onResize() on itself when initially created, and whenever the window is resized.

NOTE: This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <!DOCTYPE> declaration.

Example

{@example com.google.gwt.examples.LayoutPanelExample}

Summary

[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
Public Methods
static RootLayoutPanel get()
Gets the singleton instance of RootLayoutPanel.
Protected Methods
void onLoad()
This method is called immediately after a widget becomes attached to the browser's document.
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.LayoutPanel
From class com.google.gwt.user.client.ui.ComplexPanel
From class com.google.gwt.user.client.ui.Panel
From class com.google.gwt.user.client.ui.Widget
From class com.google.gwt.user.client.ui.UIObject
From class java.lang.Object
From interface com.google.gwt.event.logical.shared.HasAttachHandlers
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.user.client.EventListener
From interface com.google.gwt.user.client.ui.AnimatedLayout
From interface com.google.gwt.user.client.ui.HasWidgets
From interface com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
From interface com.google.gwt.user.client.ui.IndexedPanel
From interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
From interface com.google.gwt.user.client.ui.IsWidget
From interface com.google.gwt.user.client.ui.RequiresResize
From interface java.lang.Iterable

Public Methods

public static RootLayoutPanel get ()

Gets the singleton instance of RootLayoutPanel. This instance will always be attached to the document body via get().

Note that, unlike get(String), this class provides no way to get an instance for any element on the page other than the document body. This is because we know of no way to get resize events for anything but the window.

Protected Methods

protected void onLoad ()

This method is called immediately after a widget becomes attached to the browser's document.