java.lang.Object | |||
↳ | com.google.gwt.user.client.ui.UIObject | ||
↳ | com.google.gwt.user.client.ui.Widget | ||
↳ | com.google.gwt.user.client.ui.Composite |
Known Direct Subclasses |
Known Indirect Subclasses |
A type of widget that can wrap another widget, hiding the wrapped widget's methods. When added to a panel, a composite behaves exactly as if the widget it wraps had been added.
The composite is useful for creating a single widget out of an aggregate of multiple other widgets contained in a single panel.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Determines whether this widget is currently attached to the browser's
document (i.e., there is an unbroken chain of widgets between this widget
and the underlying browser document).
| |||||||||||
Fired whenever a browser event is received.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Provides subclasses access to the topmost widget that defines this
composite.
| |||||||||||
Sets the widget to be wrapped by the composite.
| |||||||||||
This method is called when a widget is attached to the browser's document. | |||||||||||
This method is called when a widget is detached from the browser's document. | |||||||||||
This method is deprecated.
Use
initWidget(Widget) instead
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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.IsWidget
|
Determines whether this widget is currently attached to the browser's document (i.e., there is an unbroken chain of widgets between this widget and the underlying browser document).
true
if the widget is attached
Fired whenever a browser event is received.
event | the event received |
---|
Provides subclasses access to the topmost widget that defines this composite.
Sets the widget to be wrapped by the composite. The wrapped widget must be
set before calling any Widget
methods on this object, or adding it
to a panel. This method may only be called once for a given composite.
widget | the widget to be wrapped |
---|
This method is called when a widget is attached to the browser's document.
To receive notification after a Widget has been added to the document,
override the onLoad()
method or use addAttachHandler(AttachEvent.Handler)
.
It is strongly recommended that you override onLoad()
or
doAttachChildren()
instead of this method to avoid inconsistencies
between logical and physical attachment states.
Subclasses that override this method must call
super.onAttach()
to ensure that the Widget has been attached
to its underlying Element.
This method is called when a widget is detached from the browser's
document. To receive notification before a Widget is removed from the
document, override the onUnload()
method or use addAttachHandler(AttachEvent.Handler)
.
It is strongly recommended that you override onUnload()
or
doDetachChildren()
instead of this method to avoid inconsistencies
between logical and physical attachment states.
Subclasses that override this method must call
super.onDetach()
to ensure that the Widget has been detached
from the underlying Element. Failure to do so will result in application
memory leaks due to circular references between DOM Elements and JavaScript
objects.
This method is deprecated.
Use initWidget(Widget)
instead
This method was for initializing the Widget to be wrapped by this
Composite, but has been deprecated in favor of initWidget(Widget)
.