Package com.google.gwt.user.client.ui
Class FiniteWidgetIterator
- java.lang.Object
-
- com.google.gwt.user.client.ui.FiniteWidgetIterator
-
- All Implemented Interfaces:
java.util.Iterator<Widget>
class FiniteWidgetIterator extends java.lang.Object implements java.util.Iterator<Widget>
Iterator over a finite number of widgets, which are stored in a delegate class (usually a widget panel).In order to use this class, assign each widget in the panel an arbitrary index. For example,
HeaderPaneldefines the header as index 0, the content as index 1, and the footer as index 2. Construct a newFiniteWidgetIteratorwith aFiniteWidgetIterator.WidgetProviderthat provides the child widgets.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFiniteWidgetIterator.WidgetProviderProvides widgets to the iterator.
-
Constructor Summary
Constructors Constructor Description FiniteWidgetIterator(FiniteWidgetIterator.WidgetProvider provider, int widgetCount)Construct a newFiniteWidgetIterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Widgetnext()voidremove()
-
-
-
Constructor Detail
-
FiniteWidgetIterator
public FiniteWidgetIterator(FiniteWidgetIterator.WidgetProvider provider, int widgetCount)
Construct a newFiniteWidgetIterator.The widget count is the number of child widgets that the panel supports, regardless of whether or not they are set.
- Parameters:
provider- the widget providerwidgetCount- the finite number of widgets that can be provided
-
-