|
||||||||||
| 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.ComplexPanel
public abstract class ComplexPanel
Abstract base class for panels that can contain multiple child widgets.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
ComplexPanel()
|
|
| Method Summary | |
|---|---|
Widget |
getWidget(int index)
Gets the child widget at the specified index. |
int |
getWidgetCount()
Gets the number of child widgets in this panel. |
int |
getWidgetIndex(Widget child)
Gets the index of the specified child widget. |
java.util.Iterator<Widget> |
iterator()
Gets an iterator for the contained widgets. |
boolean |
remove(int index)
Removes the widget at the specified index. |
boolean |
remove(Widget w)
Removes a child widget. |
| Methods inherited from class com.google.gwt.user.client.ui.Panel |
|---|
add, clear |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
fireEvent, getLayoutData, getParent, isAttached, onBrowserEvent, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ComplexPanel()
| Method Detail |
|---|
public Widget getWidget(int index)
IndexedPanel
getWidget in interface IndexedPanelindex - the child widget's index
public int getWidgetCount()
IndexedPanel
getWidgetCount in interface IndexedPanelpublic int getWidgetIndex(Widget child)
IndexedPanel
getWidgetIndex in interface IndexedPanelchild - the widget to be found
-1 if it is not a child of
this panelpublic java.util.Iterator<Widget> iterator()
HasWidgetsIterator.remove().
iterator in interface HasWidgetsiterator in interface java.lang.Iterable<Widget>public boolean remove(int index)
IndexedPanel
remove in interface IndexedPanelindex - the index of the widget to be removed
false if the widget is not presentpublic 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 present
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||