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.AbsolutePanel | |||||
↳ | com.google.gwt.user.client.ui.RootPanel |
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
onModuleLoad()
methods.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Marks a widget as detached and removes it from the detach list.
| |||||||||||
Adds a widget to the detach list.
| |||||||||||
Gets the root panel associated with a given browser element.
| |||||||||||
Gets the default root panel.
| |||||||||||
Convenience method for getting the document's body element.
| |||||||||||
Determines whether the given widget is in the detach list.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.AbsolutePanel
| |||||||||||
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.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.InsertPanel
| |||||||||||
From interface
com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.IsWidget
| |||||||||||
From interface
java.lang.Iterable
|
Marks a widget as detached and removes it from the detach list.
If an element belonging to a widget originally passed to
detachOnWindowClose(Widget)
has been removed from the document,
calling this method will cause it to be marked as detached immediately.
Failure to do so will keep the widget from being garbage collected until
the page is unloaded.
This method may only be called per widget, and only for widgets that were
originally passed to detachOnWindowClose(Widget)
.
widget | the widget that no longer needs to be cleaned up when the page closes |
---|
Adds a widget to the detach list. This is the list of widgets to be detached when the page unloads.
This method must be called for all widgets that have no parent widgets.
These are most commonly RootPanels
, but can also be any
widget used to wrap an existing element on the page. Failing to do this may
cause these widgets to leak memory. This method is called automatically by
widgets' wrap methods (e.g.
wrap(com.google.gwt.dom.client.Element)
).
This method may not be called on any widget whose element is contained in another widget. This is to ensure that the DOM and Widget hierarchies cannot get into an inconsistent state.
widget | the widget to be cleaned up when the page closes |
---|
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.
id | the id of the element to be wrapped with a root panel (
null specifies the default instance, which wraps the
<body> element) |
---|
null
if no such element was found
Gets the default root panel. This panel wraps the 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.
Convenience method for getting the document's body element.
Determines whether the given widget is in the detach list.
widget | the widget to be checked |
---|
true
if the widget is in the detach list