java.lang.Object | ||||
↳ | com.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 |
Known Direct Subclasses |
Known Indirect Subclasses |
Abstract base class for panels that can contain multiple child widgets.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the child widget at the specified index.
| |||||||||||
Gets the number of child widgets in this panel.
| |||||||||||
Gets the index of the specified child widget.
| |||||||||||
Removes a child widget.
| |||||||||||
Removes the widget at the specified index.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a new child widget to the panel, attaching its Element to the
specified container Element.
| |||||||||||
Adjusts beforeIndex to account for the possibility that the given widget is
already a child of this panel.
| |||||||||||
Checks that
index is in the range [0, getWidgetCount()), which
is the valid range on accessible indexes. | |||||||||||
Checks that
index is in the range [0, getWidgetCount()], which
is the valid range for indexes on an insertion. | |||||||||||
Gets the list of children contained in this panel.
| |||||||||||
Insert a new child Widget into this Panel at a specified index, attaching
its Element to the specified container Element.
| |||||||||||
This method is deprecated.
Use
insert(Widget, Element, int, boolean) instead
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.Panel
| |||||||||||
From class
com.google.gwt.user.client.ui.Widget
| |||||||||||
From class
com.google.gwt.user.client.ui.UIObject
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface com.google.gwt.event.logical.shared.HasAttachHandlers | |||||||||||
From interface com.google.gwt.event.shared.HasHandlers | |||||||||||
From interface
com.google.gwt.user.client.EventListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasWidgets
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.IndexedPanel
| |||||||||||
From interface
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.IsWidget
| |||||||||||
From interface
java.lang.Iterable
|
Gets the child widget at the specified index.
index | the child widget's index |
---|
Gets the number of child widgets in this panel.
Gets the index of the specified child widget.
child | the widget to be found |
---|
-1
if it is not a child of this
panel
Removes a child widget.
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
.w | the widget to be removed |
---|
true
if the child was present
Removes the widget at the specified index.
index | the index of the widget to be removed |
---|
false
if the widget is not present
Adds a new child widget to the panel, attaching its Element to the specified container Element.
child | the child widget to be added |
---|---|
container | the element within which the child will be contained |
Adjusts beforeIndex to account for the possibility that the given widget is already a child of this panel.
child | the widget that might be an existing child |
---|---|
beforeIndex | the index at which it will be added to this panel |
Checks that index
is in the range [0, getWidgetCount()), which
is the valid range on accessible indexes.
index | the index being accessed |
---|
Checks that index
is in the range [0, getWidgetCount()], which
is the valid range for indexes on an insertion.
index | the index where insertion will occur |
---|
Gets the list of children contained in this panel.
Insert a new child Widget into this Panel at a specified index, attaching
its Element to the specified container Element. The child Element will
either be attached to the container at the same index, or simply appended
to the container, depending on the value of domInsert
.
child | the child Widget to be added |
---|---|
container | the Element within which child will be
contained |
beforeIndex | the index before which child will be
inserted |
domInsert | if true , insert child into
container at beforeIndex ; otherwise
append child to the end of container .
|
This method is deprecated.
Use insert(Widget, Element, int, boolean)
instead
This method was used by subclasses to insert a new child Widget. It is now
deprecated because it was ambiguous whether the child
should
be appended to container
element versus inserted into
container
at beforeIndex
. Use
insert(Widget, Element, int, boolean)
, which clarifies this
ambiguity.