Package org.zkoss.zk.ui.select.impl
Class ComponentMatchCtx
- java.lang.Object
-
- org.zkoss.zk.ui.select.impl.ComponentMatchCtx
-
public class ComponentMatchCtx extends java.lang.ObjectA wrapper of Component, providing a context for selector matching algorithm.- Since:
- 6.0.0
- Author:
- simonpai
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentgetComponent()Return the component.intgetComponentChildIndex()Return the child index of the component.intgetComponentSiblingSize()Return the count of total siblings of the component, including itself.ComponentMatchCtxgetParent()Return the parent contextbooleanisMatched()Return true if the component matched the last position of any selectors in the list.booleanisMatched(int selectorIndex)Return true if the component matched the last position of the given selector.booleanisQualified(int selectorIndex, int position)Return true if the component matched the given position of the given selector.booleanisShadowHost()Return true if the component is a shadow host, i.e. component's seRoots is not emptybooleanmatch(SimpleSelectorSequence seq, java.util.Map<java.lang.String,PseudoClassDef> defs)Return true if the component qualifies the local properties of a given SimpleSelectorSequence.java.lang.StringtoString()
-
-
-
Method Detail
-
getParent
public ComponentMatchCtx getParent()
Return the parent context
-
getComponent
public Component getComponent()
Return the component.
-
getComponentChildIndex
public int getComponentChildIndex()
Return the child index of the component. If the component is one of the page roots, return -1.
-
getComponentSiblingSize
public int getComponentSiblingSize()
Return the count of total siblings of the component, including itself.
-
isQualified
public boolean isQualified(int selectorIndex, int position)Return true if the component matched the given position of the given selector.- Parameters:
selectorIndex-position-
-
isMatched
public boolean isMatched()
Return true if the component matched the last position of any selectors in the list. (i.e. the one we are looking for)
-
isMatched
public boolean isMatched(int selectorIndex)
Return true if the component matched the last position of the given selector.- Parameters:
selectorIndex-
-
match
public boolean match(SimpleSelectorSequence seq, java.util.Map<java.lang.String,PseudoClassDef> defs)
Return true if the component qualifies the local properties of a given SimpleSelectorSequence.- Parameters:
seq-defs-
-
isShadowHost
public boolean isShadowHost()
Return true if the component is a shadow host, i.e. component's seRoots is not empty
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-