Package com.openhtmltopdf.css.extend
Interface AttributeResolver
-
- All Known Implementing Classes:
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)May return null.StringgetAttributeValue(Object e, String namespaceURI, String attrName)May return null.StringgetClass(Object e)may return nullStringgetElementStyling(Object e)may return nullStringgetID(Object e)may return nullStringgetLang(Object e)may return nullStringgetNonCssStyling(Object e)may return nullbooleanisActive(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
String getAttributeValue(Object e, String attrName)
May return null. Required to return null if attribute does not exist and not null if attribute exists.
-
getAttributeValue
String getAttributeValue(Object e, String namespaceURI, String attrName)
May return null. Required to return null if attribute does not exist and not null if attribute exists.
-
getNonCssStyling
String getNonCssStyling(Object e)
may return null- Parameters:
e- PARAM- Returns:
- The non css styling (specificity 0,0,0,0 on author styles, according to css 2.1)
-
getElementStyling
String getElementStyling(Object e)
may return null- Parameters:
e- PARAM- 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- Parameters:
e- PARAM- Returns:
- The link value
-
isVisited
boolean isVisited(Object e)
Gets the visited attribute of the AttributeResolver object- Parameters:
e- PARAM- Returns:
- The visited value
-
isHover
boolean isHover(Object e)
Gets the hover attribute of the AttributeResolver object- Parameters:
e- PARAM- Returns:
- The hover value
-
isActive
boolean isActive(Object e)
Gets the active attribute of the AttributeResolver object- Parameters:
e- PARAM- Returns:
- The active value
-
isFocus
boolean isFocus(Object e)
Gets the focus attribute of the AttributeResolver object- Parameters:
e- PARAM- Returns:
- The focus value
-
-