public static final class FormLayoutUtils.ConstraintIterator
extends java.lang.Object
CellConstraints.
The container's child component collection and the layout's
constraints collection must not be changed during the iteration;
otherwise the behavior of this iterator is unspecified and unsafe.FormLayout,
CellConstraints| Modifier and Type | Field and Description |
|---|---|
private java.awt.Component[] |
components
Holds a copy of the container's components.
|
private int |
index
The current index in the component array.
|
private FormLayout |
layout
Refers to the FormLayout instance used to look up constraints.
|
| Constructor and Description |
|---|
ConstraintIterator(java.awt.Container container)
Constructs a ConstraintIterator for the given FormLayout container.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
CellConstraints |
nextConstraints()
Returns the next element in the iteration.
|
private final FormLayout layout
private final java.awt.Component[] components
private int index
public ConstraintIterator(java.awt.Container container)
CellConstraints.container - the layout containerjava.lang.IllegalArgumentException - if the container's layout is
not a FormLayoutpublic boolean hasNext()
public CellConstraints nextConstraints()
java.util.NoSuchElementException - iteration has no more elements.