|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.ui.select.impl.ComponentIterator
public class ComponentIterator
An implementation of Iterator<Component> that realizes the selector matching algorithm. The iteration is lazily evaluated. i.e. The iterator will not perform extra computation until .next() is called.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 stringMethod Detail |
---|
public 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 name
public 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |