com.google.gwt.user.client.ui
Class RootPanel

java.lang.Object
  extended bycom.google.gwt.user.client.ui.UIObject
      extended bycom.google.gwt.user.client.ui.Widget
          extended bycom.google.gwt.user.client.ui.Panel
              extended bycom.google.gwt.user.client.ui.ComplexPanel
                  extended bycom.google.gwt.user.client.ui.AbsolutePanel
                      extended bycom.google.gwt.user.client.ui.RootPanel
All Implemented Interfaces:
EventListener, HasWidgets

public class RootPanel
extends AbsolutePanel

The panel to which all other widgets must ultimately be added. RootPanels are never created directly. Rather, they are accessed via get().

Most applications will add widgets to the default root panel in their EntryPoint.onModuleLoad() methods.


Field Summary
 
Fields inherited from class java.lang.Object
typeId, typeName
 
Method Summary
static RootPanel get()
          Gets the default root panel.
static RootPanel get(String id)
          Gets the root panel associated with a given browser element.
static Element getBodyElement()
          Convenience method for getting the document's body element.
 
Methods inherited from class com.google.gwt.user.client.ui.AbsolutePanel
add, add, remove, setWidgetPosition
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
clear, getWidget, getWidgetCount, getWidgetIndex, insert, iterator
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, disown, onAttach, onDetach
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onBrowserEvent, onLoad
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, finalize, hashCode
 

Method Detail

get

public static RootPanel get()
Gets the default root panel. This panel wraps body of the browser's document. This root panel can contain any number of widgets, which will be laid out in their natural HTML ordering. Many applications, however, will add a single panel to the RootPanel to provide more structure.

Returns:
the default RootPanel

get

public static RootPanel get(String id)
Gets the root panel associated with a given browser element. For this to work, the HTML document into which the application is loaded must have specified an element with the given id. Getting a root panel for a browser element will remove any child elements currently present within it.

Parameters:
id - the id of the element to be wrapped with a root panel
Returns:
the root panel, or null if no such element was found

getBodyElement

public static Element getBodyElement()
Convenience method for getting the document's body element.

Returns:
the document's body element


This javadoc distribution was not produced by Google. The official documentation is here.