java.lang.Object
io.sf.carte.doc.style.css.om.AbstractSelectorMatcher
io.sf.carte.doc.style.css.om.DOMSelectorMatcher
- All Implemented Interfaces:
SelectorMatcher
CSS Selector matcher for DOM.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetAttributeValue(String attrName) Gets the value of the given attribute in the element associated to this selector matcher.protected DirectionalityHelper.DirectionalityGet the directionality of the element associated to this matcher.protected StringgetId()Gets the 'id' attribute of the element associated to this selector matcher.protected StringGets the language of the element associated to this selector matcher.protected Stringprotected CSSDocumentprotected AbstractSelectorMatcherGets the selector matcher for the parent element.protected AbstractSelectorMatcherGets the selector matcher for the previous sibling.protected booleanhasAttribute(String attrName) Checks if is defined the given attribute in the element associated to this selector matcher.protected intindexOf(SelectorList selectors) protected booleanisActivePseudoClass(String pseudoclassName) protected booleanisBlank()protected booleanprotected booleanprotected booleanisEmpty()protected booleanThe element in this matcher is the first child?protected booleanThe element in this matcher is the first child of its type (tag name)?protected booleanThe element in this matcher is the last child?protected booleanThe element in this matcher is the last child of its type (tag name)?protected booleanisNthLastOfType(int step, int offset) protected booleanisNthOfType(int step, int offset) protected booleanisRoot()protected booleanisTarget()protected intreverseIndexOf(SelectorList selectors) protected booleanscopeMatchChild(DescendantSelector selector) protected booleanscopeMatchDirectAdjacent(SiblingSelector selector) Methods inherited from class io.sf.carte.doc.style.css.om.AbstractSelectorMatcher
findStatePseudoClasses, getClassAttribute, getLocalName, getPseudoElement, isAnyLink, isChecked, isDir, isEnabled, isFormElement, isIndeterminate, isNotVisitedLink, isOnlyChild, isOnlyOfType, isPlaceholderShown, isReadWrite, isUIDefault, isVisitedLink, matches, matches, setLocalName, setPseudoElement, toString
-
Constructor Details
-
DOMSelectorMatcher
-
-
Method Details
-
getParentSelectorMatcher
Description copied from class:AbstractSelectorMatcherGets the selector matcher for the parent element.- Specified by:
getParentSelectorMatcherin classAbstractSelectorMatcher- Returns:
- the selector matcher for the parent element, or null if none.
-
getPreviousSiblingSelectorMatcher
Description copied from class:AbstractSelectorMatcherGets the selector matcher for the previous sibling.- Specified by:
getPreviousSiblingSelectorMatcherin classAbstractSelectorMatcher- Returns:
- the selector matcher for the previous sibling, or null if no previous sibling.
-
indexOf
- Specified by:
indexOfin classAbstractSelectorMatcher
-
reverseIndexOf
- Specified by:
reverseIndexOfin classAbstractSelectorMatcher
-
isActivePseudoClass
- Overrides:
isActivePseudoClassin classAbstractSelectorMatcher
-
isFirstChild
protected boolean isFirstChild()Description copied from class:AbstractSelectorMatcherThe element in this matcher is the first child?- Specified by:
isFirstChildin classAbstractSelectorMatcher- Returns:
trueif the element in this matcher is a first child,falseif not.
-
isLastChild
protected boolean isLastChild()Description copied from class:AbstractSelectorMatcherThe element in this matcher is the last child?- Specified by:
isLastChildin classAbstractSelectorMatcher- Returns:
trueif the element in this matcher is the last child,falseif not.
-
isFirstOfType
protected boolean isFirstOfType()Description copied from class:AbstractSelectorMatcherThe element in this matcher is the first child of its type (tag name)?- Specified by:
isFirstOfTypein classAbstractSelectorMatcher- Returns:
trueif the element in this matcher is a first child of its type,falseif not.
-
isLastOfType
protected boolean isLastOfType()Description copied from class:AbstractSelectorMatcherThe element in this matcher is the last child of its type (tag name)?- Specified by:
isLastOfTypein classAbstractSelectorMatcher- Returns:
trueif the element in this matcher is the last child of its type,falseif not.
-
isNthOfType
protected boolean isNthOfType(int step, int offset) - Specified by:
isNthOfTypein classAbstractSelectorMatcher
-
isNthLastOfType
protected boolean isNthLastOfType(int step, int offset) - Specified by:
isNthLastOfTypein classAbstractSelectorMatcher
-
isTarget
protected boolean isTarget()- Specified by:
isTargetin classAbstractSelectorMatcher
-
isRoot
protected boolean isRoot()- Specified by:
isRootin classAbstractSelectorMatcher
-
isEmpty
protected boolean isEmpty()- Specified by:
isEmptyin classAbstractSelectorMatcher
-
isBlank
protected boolean isBlank()- Specified by:
isBlankin classAbstractSelectorMatcher
-
isDisabled
protected boolean isDisabled()- Specified by:
isDisabledin classAbstractSelectorMatcher
-
isDefaultButton
protected boolean isDefaultButton()- Specified by:
isDefaultButtonin classAbstractSelectorMatcher
-
getNamespaceURI
- Specified by:
getNamespaceURIin classAbstractSelectorMatcher
-
getAttributeValue
Description copied from class:AbstractSelectorMatcherGets the value of the given attribute in the element associated to this selector matcher.- Specified by:
getAttributeValuein classAbstractSelectorMatcher- Parameters:
attrName- the attribute name.- Returns:
- the attribute value, or the empty string if the attribute is defined but has no value, also if the attribute is not defined. Never returns null.
-
hasAttribute
Description copied from class:AbstractSelectorMatcherChecks if is defined the given attribute in the element associated to this selector matcher.- Specified by:
hasAttributein classAbstractSelectorMatcher- Parameters:
attrName- the attribute name.- Returns:
trueif the attribute is defined,falseif not.
-
getOwnerDocument
- Specified by:
getOwnerDocumentin classAbstractSelectorMatcher
-
getId
Description copied from class:AbstractSelectorMatcherGets the 'id' attribute of the element associated to this selector matcher.- Specified by:
getIdin classAbstractSelectorMatcher- Returns:
- the 'id' attribute value, or the empty string if the element has no 'id'.
-
getLanguage
Description copied from class:AbstractSelectorMatcherGets the language of the element associated to this selector matcher.- Specified by:
getLanguagein classAbstractSelectorMatcher- Returns:
- the language, or the empty String if the element has no language defined.
-
getDirectionality
Description copied from class:AbstractSelectorMatcherGet the directionality of the element associated to this matcher.- Specified by:
getDirectionalityin classAbstractSelectorMatcher- Returns:
- the directionality.
-
scopeMatchChild
- Specified by:
scopeMatchChildin classAbstractSelectorMatcher
-
scopeMatchDirectAdjacent
- Specified by:
scopeMatchDirectAdjacentin classAbstractSelectorMatcher
-