| java.lang.Object com.google.gwt.user.client.ui.UIObject com.google.gwt.user.client.ui.Widget
All known Subclasses: com.google.gwt.user.client.ui.Panel, com.google.gwt.user.client.ui.Frame, com.google.gwt.user.client.ui.FocusWidget, com.google.gwt.user.client.ui.Label, com.google.gwt.user.client.ui.MenuBar, com.google.gwt.user.client.ui.Hidden, com.google.gwt.user.client.ui.Image, com.google.gwt.user.client.ui.Composite, com.google.gwt.user.client.ui.Tree, com.google.gwt.user.client.ui.Hyperlink, com.google.gwt.user.client.ui.FileUpload,
Method Summary | |
protected void | doAttachChildren() If a widget implements HasWidgets, it must override this method and call
onAttach() for each of its child widgets. | protected void | doDetachChildren() If a widget implements HasWidgets, it must override this method and call
onDetach() for each of its child widgets. | Object | getLayoutData() Gets the panel-defined layout data associated with this widget. | public Widget | getParent() Gets this widget's parent panel. | public boolean | isAttached() 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). | protected void | onAttach() This method is called when a widget is attached to the browser's document. | public void | onBrowserEvent(Event event) | protected void | onDetach() This method is called when a widget is detached from the browser's
document. | protected void | onLoad() This method is called immediately after a widget becomes attached to the
browser's document. | protected void | onUnload() This method is called immediately before a widget will be detached from the
browser's document. | public void | removeFromParent() Removes this widget from its parent widget. | protected void | setElement(Element elem) Sets this object's browser element. | void | setLayoutData(Object layoutData) Sets the panel-defined layout data associated with this widget. | void | setParent(Widget parent) Sets this widget's parent. |
doAttachChildren | protected void doAttachChildren()(Code) | | If a widget implements HasWidgets, it must override this method and call
onAttach() for each of its child widgets.
See Also: Panel.onAttach |
doDetachChildren | protected void doDetachChildren()(Code) | | If a widget implements HasWidgets, it must override this method and call
onDetach() for each of its child widgets.
See Also: Panel.onDetach |
getLayoutData | Object getLayoutData()(Code) | | Gets the panel-defined layout data associated with this widget.
the widget's layout data See Also: Widget.setLayoutData |
getParent | public Widget getParent()(Code) | | Gets this widget's parent panel.
the widget's parent panel |
isAttached | public boolean isAttached()(Code) | | 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 |
onAttach | protected void onAttach()(Code) | | 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
Widget.onLoad method.
Subclasses that override this method must call
super.onAttach() to ensure that the Widget has been attached
to its underlying Element.
throws: IllegalStateException - if this widget is already attached |
onBrowserEvent | public void onBrowserEvent(Event event)(Code) | | |
onDetach | protected void onDetach()(Code) | | 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
Widget.onUnload method.
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.
throws: IllegalStateException - if this widget is already detached |
onLoad | protected void onLoad()(Code) | | This method is called immediately after a widget becomes attached to the
browser's document.
|
onUnload | protected void onUnload()(Code) | | This method is called immediately before a widget will be detached from the
browser's document.
|
removeFromParent | public void removeFromParent()(Code) | | Removes this widget from its parent widget. If it has no parent, this
method does nothing.
throws: IllegalStateException - if this widget's parent does not supportremoval (e.g. Composite) |
setElement | protected void setElement(Element elem)(Code) | | Sets this object's browser element. Widget subclasses must call this method
before attempting to call any other methods.
If a browser element has already been attached, then it is replaced with
the new element. The old event listeners are removed from the old browser
element, and the event listeners are set up on the new browser element.
Parameters: elem - the object's new element |
setLayoutData | void setLayoutData(Object layoutData)(Code) | | Sets the panel-defined layout data associated with this widget. Only the
panel that currently contains a widget should ever set this value. It
serves as a place to store layout bookkeeping data associated with a
widget.
Parameters: layoutData - the widget's layout data |
setParent | void setParent(Widget parent)(Code) | | Sets this widget's parent. This method should only be called by
Panel and
Composite .
Parameters: parent - the widget's new parent throws: IllegalStateException - if parent is non-null and thewidget already has a parent |
|
|