public class ComponentIterator
extends java.lang.Object
implements java.util.Iterator<org.zkoss.zk.ui.Component>
Constructor and Description |
---|
ComponentIterator(org.zkoss.zk.ui.Component root,
java.lang.String selector)
Create an iterator which selects from all the descendants of a given
component, including itself.
|
ComponentIterator(org.zkoss.zk.ui.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.
|
org.zkoss.zk.ui.Component |
next()
Return the next matched component.
|
int |
nextIndex()
Return the index of the next component.
|
org.zkoss.zk.ui.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(org.zkoss.zk.ui.Page page, java.lang.String selector)
page
- the reference page for selectorselector
- the selector stringpublic ComponentIterator(org.zkoss.zk.ui.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<org.zkoss.zk.ui.Component>
public org.zkoss.zk.ui.Component next()
next
in interface java.util.Iterator<org.zkoss.zk.ui.Component>
public void remove()
remove
in interface java.util.Iterator<org.zkoss.zk.ui.Component>
public org.zkoss.zk.ui.Component peek()
public int nextIndex()
Copyright © 2019 Potix Corporation. All rights reserved.