FiniteWidgetIterator (GWT Javadoc)

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, `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.

Nested Class Summary
`static interface` | `FiniteWidgetIterator.WidgetProvider` Provides widgets to the iterator.

Constructor Summary
`FiniteWidgetIterator(FiniteWidgetIterator.WidgetProvider provider, int widgetCount)` Construct a new `FiniteWidgetIterator`.

Method Summary
`boolean` | `hasNext()`
`Widget` | `next()`
`void` | `remove()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FiniteWidgetIterator

    public FiniteWidgetIterator(FiniteWidgetIterator.WidgetProvider provider,
                                int widgetCount)

  Construct a new `FiniteWidgetIterator`.

  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 provider
    `widgetCount` - the finite number of widgets that can be provided

Method Detail

### hasNext

    public boolean hasNext()

  Specified by:
    `hasNext` in interface `java.util.Iterator<Widget>`

### next

    public Widget next()

  Specified by:
    `next` in interface `java.util.Iterator<Widget>`

### remove

    public void remove()

  Specified by:
    `remove` in interface `java.util.Iterator<Widget>`

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD