Package org.xhtmlrenderer.css.extend
Interface AttributeResolver
-
- All Known Implementing Classes:
DOMStaticXhtmlAttributeResolver,StandardAttributeResolver
public interface AttributeResolverIn XML, an application may or may not know how to find the ID and/or class and/or attribute defaults of an element.To enable matching of identity conditions, class conditions, language, and attribute defaults you need to provide an AttributeResolver to the StyleMap.
NOTE: The application is required to look in a document's internal subset for default attribute values, but the application is not required to use its built-in knowledge of a namespace or look in the external subset.
- Author:
- Torbjoern Gannholm
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetAttributeValue(Object e, String attrName)Required to return null if attribute does not exist, and not null if attribute exists.StringgetAttributeValue(Object e, String namespaceURI, String attrName)Required to return null if attribute does not exist and not null if attribute exists.StringgetClass(Object e)StringgetElementStyling(Object e)StringgetID(Object e)StringgetLang(Object e)StringgetNonCssStyling(Object e)booleanisActive(Object e)Gets the active attribute of the AttributeResolver objectbooleanisFocus(Object e)Gets the focus attribute of the AttributeResolver objectbooleanisHover(Object e)Gets the hover attribute of the AttributeResolver objectbooleanisLink(Object e)Gets the link attribute of the AttributeResolver objectbooleanisVisited(Object e)Gets the visited attribute of the AttributeResolver object
-
-
-
Method Detail
-
getAttributeValue
@Nullable String getAttributeValue(Object e, String attrName)
Required to return null if attribute does not exist, and not null if attribute exists.
-
getAttributeValue
@Nullable String getAttributeValue(Object e, String namespaceURI, String attrName)
Required to return null if attribute does not exist and not null if attribute exists.
-
getNonCssStyling
@Nullable String getNonCssStyling(Object e)
- Returns:
- The non css styling (specificity 0,0,0,0 on author styles, according to css 2.1)
-
getElementStyling
@Nullable String getElementStyling(Object e)
- Returns:
- The elementStyling value (corresponding to xhtml style attribute, specificity 1,0,0,0 according to css 2.1)
-
isLink
boolean isLink(Object e)
Gets the link attribute of the AttributeResolver object
-
isVisited
boolean isVisited(Object e)
Gets the visited attribute of the AttributeResolver object
-
isHover
boolean isHover(Object e)
Gets the hover attribute of the AttributeResolver object
-
isActive
boolean isActive(Object e)
Gets the active attribute of the AttributeResolver object
-
isFocus
boolean isFocus(Object e)
Gets the focus attribute of the AttributeResolver object
-
-