IVisitor
instead.@Deprecated public class ComponentHierarchyIterator extends AbstractHierarchyIteratorWithFilter<Component,Component>
A fluent or builder type of API is provided to configure the iterator with filters.
MarkupContainer.visitChildren(org.apache.wicket.util.visit.IVisitor)
,
MarkupContainer.visitChildren(Class, org.apache.wicket.util.visit.IVisitor)
Constructor and Description |
---|
ComponentHierarchyIterator(Component component)
Deprecated.
Construct.
|
ComponentHierarchyIterator(Component component,
Class<?> clazz)
Deprecated.
Convenience Constructor
|
ComponentHierarchyIterator(Component component,
Class<?> clazz,
boolean visible,
boolean enabled)
Deprecated.
Convenience Constructor
|
Modifier and Type | Method and Description |
---|---|
ComponentHierarchyIterator |
addFilter(IteratorFilter<Component> filter)
Deprecated.
Add a filter (fluent API)
|
ComponentHierarchyIterator |
addTraverseFilters(IteratorFilter<Component> filter)
Deprecated.
Add a filter to the traversal filter list (fluent API).
|
ComponentHierarchyIterator |
filterByClass(Class<?> clazz)
Deprecated.
Ignore components which don't implement (instanceof) the class provided.
|
ComponentHierarchyIterator |
filterById(String match)
Deprecated.
Ignore all components which don't match the id (regex).
|
ComponentHierarchyIterator |
filterByVisibility()
Deprecated.
Ignore all Components which not visible.
|
ComponentHierarchyIterator |
filterEnabled()
Deprecated.
Ignore all Components which not enabled (disabled) in the hierarchy
|
ComponentHierarchyIterator |
filterLeavesOnly()
Deprecated.
Add a filter which returns only leaf components.
|
protected boolean |
hasChildren(Component elem)
Deprecated.
Only MarkupContainer's might have children
|
protected Iterator<Component> |
newIterator(Component node)
Deprecated.
The component must be a MarkupContainer to contain children
|
getFilters, getFirst, getTraverseFilters, onFilter, onTraversalFilter, replaceFilterSet, toList
dontGoDeeper, hasNext, iterator, next, remove, setChildFirst, skipRemainingSiblings, toString
public ComponentHierarchyIterator(Component component)
component
- Iterate over the containers childrenpublic ComponentHierarchyIterator(Component component, Class<?> clazz, boolean visible, boolean enabled)
component
- Iterate over the containers childrenclazz
- Add filter by classvisible
- Add filter by visibilityenabled
- Add filter by "enabled"protected Iterator<Component> newIterator(Component node)
newIterator
in class AbstractHierarchyIterator<Component,Component>
protected boolean hasChildren(Component elem)
hasChildren
in class AbstractHierarchyIterator<Component,Component>
public final ComponentHierarchyIterator filterLeavesOnly()
public ComponentHierarchyIterator filterByClass(Class<?> clazz)
clazz
- public ComponentHierarchyIterator filterByVisibility()
public ComponentHierarchyIterator filterEnabled()
public ComponentHierarchyIterator filterById(String match)
match
- Regex to find Components matchingpublic ComponentHierarchyIterator addFilter(IteratorFilter<Component> filter)
AbstractHierarchyIteratorWithFilter
addFilter
in class AbstractHierarchyIteratorWithFilter<Component,Component>
public ComponentHierarchyIterator addTraverseFilters(IteratorFilter<Component> filter)
AbstractHierarchyIteratorWithFilter
addTraverseFilters
in class AbstractHierarchyIteratorWithFilter<Component,Component>
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.