|
||||||||||
| 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
public abstract class Panel
Abstract base class for all panels, which are widgets that can contain other 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 | |
|---|---|
Panel()
|
|
| Method Summary | |
|---|---|
void |
add(Widget child)
Adds a child widget. |
void |
clear()
Removes all child widgets. |
abstract boolean |
remove(Widget child)
Removes a child widget. |
| 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 |
| Methods inherited from interface com.google.gwt.user.client.ui.HasWidgets |
|---|
iterator |
| Constructor Detail |
|---|
public Panel()
| Method Detail |
|---|
public void add(Widget child)
How to Override this Method
There are several important things that must take place in the correct order to properly add or insert a Widget to a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.
ComplexPanel.adjustIndex(Widget, int).Widget.removeFromParent() on the
Widget.WidgetCollection at the appropriate index.adopt(Widget) to finalize the add as the
very last step.
add in interface HasWidgetschild - the widget to be added
java.lang.UnsupportedOperationException - if this method is not supported (most
often this means that a specific overload must be called)HasWidgets.add(Widget)public void clear()
HasWidgets
clear in interface HasWidgetspublic abstract boolean remove(Widget child)
How 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.orphan(Widget) first while the child
Widget is still attached.WidgetCollection.
remove in interface HasWidgetschild - 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 | |||||||||