java.lang.Object | |
↳ | com.google.gwt.user.client.ui.WidgetCollection |
A simple collection of widgets to be used by
panels
and
composites
.
The main purpose of this specialized collection is to implement
remove()
in a way that delegates removal to its
panel. This makes it much easier for the panel to implement an
iterator
that
supports removal of widgets.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new widget collection.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a widget to the end of this collection.
| |||||||||||
Determines whether a given widget is contained in this collection.
| |||||||||||
Gets the widget at the given index.
| |||||||||||
Gets the index of the specified index.
| |||||||||||
Inserts a widget before the specified index.
| |||||||||||
Gets an iterator on this widget collection.
| |||||||||||
Removes the widget at the specified index.
| |||||||||||
Removes the specified widget.
| |||||||||||
Gets the number of widgets in this collection.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructs a new widget collection.
parent | the container whose remove(Widget) will be
delegated to by the iterator's remove() method.
|
---|
Adds a widget to the end of this collection.
w | the widget to be added |
---|
Determines whether a given widget is contained in this collection.
w | the widget to be searched for |
---|
true
if the widget is present
Gets the widget at the given index.
index | the index to be retrieved |
---|
IndexOutOfBoundsException | if the index is out of range |
---|
Gets the index of the specified index.
w | the widget to be found |
---|
-1
if it is
not found
Inserts a widget before the specified index.
w | the widget to be inserted |
---|---|
beforeIndex | the index before which the widget will be inserted |
IndexOutOfBoundsException | if beforeIndex is out of
range
|
---|
Gets an iterator on this widget collection. This iterator is guaranteed to
implement remove() in terms of its containing HasWidgets
.
Removes the widget at the specified index.
index | the index of the widget to be removed |
---|
IndexOutOfBoundsException | if index is out of range
|
---|
Removes the specified widget.
w | the widget to be removed |
---|
NoSuchElementException | if the widget is not present |
---|
Gets the number of widgets in this collection.