Package com.jgoodies.forms.extras
Class FormLayoutUtils.ConstraintIterator
- java.lang.Object
-
- com.jgoodies.forms.extras.FormLayoutUtils.ConstraintIterator
-
- Enclosing class:
- FormLayoutUtils
public static final class FormLayoutUtils.ConstraintIterator extends java.lang.ObjectIterates over a FormLayout container'sCellConstraints. 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.- See Also:
FormLayout,CellConstraints
-
-
Constructor Summary
Constructors Constructor Description ConstraintIterator(java.awt.Container container)Constructs a ConstraintIterator for the given FormLayout container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Returns true if the iteration has more elements.CellConstraintsnextConstraints()Returns the next element in the iteration.
-
-
-
Constructor Detail
-
ConstraintIterator
public ConstraintIterator(java.awt.Container container)
Constructs a ConstraintIterator for the given FormLayout container. Useful to iterate over the container'sCellConstraints.- Parameters:
container- the layout container- Throws:
java.lang.IllegalArgumentException- if the container's layout is not aFormLayout
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)- Returns:
- true if the iterator has more elements.
-
nextConstraints
public CellConstraints nextConstraints()
Returns the next element in the iteration.- Returns:
- the next element in the iteration.
- Throws:
java.util.NoSuchElementException- iteration has no more elements.
-
-