public class ComponentIterator extends java.lang.Object implements java.util.Iterator<Component>
Constructor and Description |
---|
ComponentIterator(Component root,
java.lang.String selector)
Create an iterator which selects from all the descendants of a given
component, including itself.
|
ComponentIterator(Page page,
java.lang.String selector)
Create an iterator which selects from all the components in the page.
|
Modifier and Type | Method and Description |
---|---|
void |
clearPseudoClassDefs()
Clear all custom pseudo class definitions.
|
boolean |
hasNext()
Return true if it has next component.
|
Component |
next()
Return the next matched component.
|
int |
nextIndex()
Return the index of the next component.
|
Component |
peek()
Return the next matched component, but the iteration is not proceeded.
|
void |
remove()
Throws UnsupportedOperationException.
|
PseudoClassDef |
removePseudoClassDef(java.lang.String name)
Remove a pseudo class definition.
|
void |
setPseudoClassDef(java.lang.String name,
PseudoClassDef def)
Add or set pseudo class definition.
|
public ComponentIterator(Page page, java.lang.String selector)
page
- the reference page for selectorselector
- the selector stringpublic ComponentIterator(Component root, java.lang.String selector)
root
- the reference component for selectorselector
- the selector stringpublic void setPseudoClassDef(java.lang.String name, PseudoClassDef def)
name
- the pseudo class namedef
- the pseudo class definitionpublic PseudoClassDef removePseudoClassDef(java.lang.String name)
name
- the pseudo class namepublic void clearPseudoClassDefs()
public boolean hasNext()
hasNext
in interface java.util.Iterator<Component>
public Component next()
next
in interface java.util.Iterator<Component>
public void remove()
remove
in interface java.util.Iterator<Component>
public Component peek()
public int nextIndex()
Copyright © 2005-2023 Potix Corporation. All Rights Reserved.