class FiniteWidgetIterator extends java.lang.Object implements java.util.Iterator<Widget>
In order to use this class, assign each widget in the panel an arbitrary
index. For example, HeaderPanel
defines the header as index 0, the
content as index 1, and the footer as index 2. Construct a new
FiniteWidgetIterator
with a FiniteWidgetIterator.WidgetProvider
that provides the
child widgets.
Modifier and Type | Class and Description |
---|---|
static interface |
FiniteWidgetIterator.WidgetProvider
Provides widgets to the iterator.
|
Constructor and Description |
---|
FiniteWidgetIterator(FiniteWidgetIterator.WidgetProvider provider,
int widgetCount)
Construct a new
FiniteWidgetIterator . |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
Widget |
next() |
void |
remove() |
public FiniteWidgetIterator(FiniteWidgetIterator.WidgetProvider provider, int widgetCount)
FiniteWidgetIterator
.
The widget count is the number of child widgets that the panel supports, regardless of whether or not they are set.
provider
- the widget providerwidgetCount
- the finite number of widgets that can be provided