Class RootPanel
The panel to which all other widgets must ultimately be added. RootPanels are
never created directly. Rather, they are accessed via
RootPanel.get().
Most applications will add widgets to the default root panel in their
EntryPoint.onModuleLoad methods.
Methods
get() | Gets the default root panel. |
get(String) | Gets the root panel associated with a given browser element. |
getBodyElement() | Convenience method for getting the document's body element. |
Method Detail
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.
Return Value
the default RootPanel
get
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.
Parameters
- id
- the id of the element to be wrapped with a root panel
Return Value
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.
Return Value
the document's body element