|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.iterator.AbstractHierarchyIterator<N,I> org.apache.wicket.util.iterator.AbstractHierarchyIteratorWithFilter<Component,I> org.apache.wicket.util.iterator.GenericComponentHierarchyIterator<I>
I
- The type which next() should return (the iterator type)public class GenericComponentHierarchyIterator<I extends Component>
Iterator over the complete Component hierarchy. The implementation is parent first, meaning that first the parent gets returned upon next() and only than it's children.
A fluent or builder type of API is provided to configure the iterator with filters.
Constructor Summary | |
---|---|
GenericComponentHierarchyIterator(Component component,
Class<? extends I> clazz)
Construct. |
Method Summary | |
---|---|
GenericComponentHierarchyIterator<I> |
addFilter(IteratorFilter<Component> filter)
Add a filter (fluent API) |
GenericComponentHierarchyIterator<I> |
addTraverseFilters(IteratorFilter<Component> filter)
Add a filter to the traversal filter list (fluent API). |
GenericComponentHierarchyIterator<I> |
filterByClass(Class<?> clazz)
Ignore components which don't implement (instanceof) the class provided. |
GenericComponentHierarchyIterator<I> |
filterById(String match)
Ignore all components which don't match the id (regex). |
GenericComponentHierarchyIterator<I> |
filterByVisibility()
Ignore all Components which not visible. |
GenericComponentHierarchyIterator<I> |
filterEnabled()
Ignore all Components which not enabled (disabled) in the hierarchy |
GenericComponentHierarchyIterator<I> |
filterLeavesOnly()
Add a filter which returns only leaf components. |
protected boolean |
hasChildren(Component elem)
Only MarkupContainer's might have children |
protected Iterator<Component> |
newIterator(Component node)
The component must be a MarkupContainer to contain children |
Methods inherited from class org.apache.wicket.util.iterator.AbstractHierarchyIteratorWithFilter |
---|
getFilters, getFirst, getTraverseFilters, onFilter, onTraversalFilter, replaceFilterSet, toList |
Methods inherited from class org.apache.wicket.util.iterator.AbstractHierarchyIterator |
---|
dontGoDeeper, hasNext, iterator, next, remove, setChildFirst, skipRemainingSiblings, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GenericComponentHierarchyIterator(Component component, Class<? extends I> clazz)
component
- Iterate over the containers childrenclazz
- Must be the same as the iterator type providedMethod Detail |
---|
protected Iterator<Component> newIterator(Component node)
newIterator
in class AbstractHierarchyIterator<Component,I extends Component>
protected boolean hasChildren(Component elem)
hasChildren
in class AbstractHierarchyIterator<Component,I extends Component>
public final GenericComponentHierarchyIterator<I> filterLeavesOnly()
public GenericComponentHierarchyIterator<I> filterByClass(Class<?> clazz)
clazz
-
public GenericComponentHierarchyIterator<I> filterByVisibility()
public GenericComponentHierarchyIterator<I> filterEnabled()
public GenericComponentHierarchyIterator<I> filterById(String match)
match
- Regex to find Components matching
public GenericComponentHierarchyIterator<I> addFilter(IteratorFilter<Component> filter)
AbstractHierarchyIteratorWithFilter
addFilter
in class AbstractHierarchyIteratorWithFilter<Component,I extends Component>
public GenericComponentHierarchyIterator<I> addTraverseFilters(IteratorFilter<Component> filter)
AbstractHierarchyIteratorWithFilter
addTraverseFilters
in class AbstractHierarchyIteratorWithFilter<Component,I extends Component>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |