|
|||||||||
| 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
com.google.gwt.user.client.ui.SimplePanel
public class SimplePanel
Abstract base class for panels that contain only one widget.
| Constructor Summary | |
|---|---|
|
SimplePanel()
Creates an empty panel that uses a DIV for its contents. |
protected |
SimplePanel(Element elem)
Creates an empty panel that uses the specified browser element for its contents. |
| Method Summary | |
|---|---|
void |
add(Widget w)
Adds a widget to this panel. |
protected Element |
getContainerElement()
Override this method to specify that an element other than the root element be the container for the panel's child widget. |
Widget |
getWidget()
Gets the panel's child widget. |
java.util.Iterator |
iterator()
Gets an iterator for the contained widgets. |
boolean |
remove(Widget w)
Removes a child widget. |
void |
setWidget(Widget w)
Sets this panel's widget. |
| Methods inherited from class com.google.gwt.user.client.ui.Panel |
|---|
adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setElement |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimplePanel()
protected SimplePanel(Element elem)
elem - the browser element to use| Method Detail |
|---|
public void add(Widget w)
add in interface HasWidgetsadd in class Panelw - the child widget to be addedHasWidgets.add(Widget)public Widget getWidget()
null if none is presentpublic java.util.Iterator iterator()
HasWidgetsIterator.remove().
public boolean remove(Widget w)
PanelHow to Override this Method
There are several important things that must take place in the correct order to properly remove a Widget from a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.
false if it is not.Panel.orphan(Widget) first while the child
Widget is still attached.WidgetCollection.
remove in interface HasWidgetsremove in class Panelw - the widget to be removed
true if the child was presentpublic void setWidget(Widget w)
w - the panel's new widget, or null to clear the panelprotected Element getContainerElement()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||