|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
Abstract base class for all panels, which are widgets that can contain other widgets.
Constructor Summary | |
Panel()
|
Method Summary | |
void |
add(Widget w)
Adds a child widget. |
protected void |
adopt(Widget w,
Element container)
This method must be called as part of the add method of any panel. |
void |
clear()
Removes all child widgets. |
protected void |
disown(Widget w)
This method must be called whenever a Widget is removed. |
protected void |
onAttach()
This method is called when a widget is attached to the browser's document. |
protected void |
onDetach()
This method is called when a widget is detached from the browser's document. |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
getParent, isAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setElement |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getTitle, isVisible, isVisible, removeStyleName, resetStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.user.client.ui.HasWidgets |
iterator, remove |
Constructor Detail |
public Panel()
Method Detail |
public void add(Widget w)
HasWidgets
add
in interface HasWidgets
w
- the widget to be addedpublic void clear()
HasWidgets
clear
in interface HasWidgets
protected void adopt(Widget w, Element container)
w
- the widget to be adoptedcontainer
- the element within which it will be containedprotected void disown(Widget w)
w
- the widget to be disownedprotected void onAttach()
Widget
Widget.onLoad()
method.
Subclasses that override this method must call
super.onAttach()
to ensure that the Widget has been
attached to the underlying Element.
onAttach
in class Widget
protected void onDetach()
Widget
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 memeroy leaks due to circular references between DOM
Elements and JavaScript objects.
onDetach
in class Widget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |