- All Implemented Interfaces:
CSSElement,CSSNode,Serializable,Cloneable,Branch,Element,Node,Element,Node
- Direct Known Subclasses:
XHTMLElement
- See Also:
-
Field Summary
Fields inherited from class org.dom4j.tree.AbstractElement
USE_STRINGVALUE_SEPARATOR, VERBOSE_TOSTRINGFields inherited from class org.dom4j.tree.AbstractBranch
DEFAULT_CONTENT_LIST_SIZEFields inherited from class org.dom4j.tree.AbstractNode
NODE_TYPE_NAMESFields inherited from interface org.dom4j.Node
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODEFields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCSSStylableElement(String name) protectedCSSStylableElement(QName qname) protectedCSSStylableElement(QName qname, int attributeCount) -
Method Summary
Modifier and TypeMethodDescriptionprotected AttributevoidExport this element's non-CSS presentational hints (if any) to the suppliedCSSStyleDeclaration.Gets the computed style declaration that applies to this element.getComputedStyle(String pseudoElt) Gets the computed style declaration that applies to this element.protected XHTMLDocumentFactorygetFeature(String feature, String version) Deprecated.abstract StringgetId()Gets theidattribute of this element.getOverrideStyle(Condition pseudoElt) Gets this element's override style declaration for a pseudo-element.TheXHTMLDocumentobject which is the root ancestor of this node.Gets the selector matcher for this element.getStyle()Gets the inline style declaration from the current contents of thestyleXHTML attribute.booleanhasOverrideStyle(Condition pseudoElt) Check whether this element has an override style declaration for the given pseudo-element.booleanCheck whether this element has non-CSS presentational hints.booleanmatches(SelectorList selist, Condition pseudoElement) Does this element (with the provided pseudo-element, if any) match the provided selector list ?booleanDoes this element (with the provided pseudo-element, if any) match the provided selector string ?setAttributeNode(Attr newAttr) setAttributeNodeNS(Attr newAttr) voidsetIdAttribute(String name, boolean isId) Deprecated.voidsetIdAttributeNode(Attr idAttr, boolean isId) Deprecated.voidsetIdAttributeNS(String namespaceURI, String localName, boolean isId) Deprecated.Methods inherited from class org.dom4j.dom.DOMElement
appendChild, attribute, cloneNode, compareDocumentPosition, createAttribute, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getParentNode, getPrefix, getPreviousSibling, getQName, getSchemaTypeInfo, getTagName, getTextContent, getUserData, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, setAttribute, setAttributeNS, setNodeValue, setPrefix, setTextContent, setUserData, supportsMethods inherited from class org.dom4j.tree.DefaultElement
add, additionalNamespaces, additionalNamespaces, addNewNode, attribute, attribute, attribute, attribute, attributeCount, attributeIterator, attributeList, attributeList, attributes, clearContent, clone, contentList, declaredNamespaces, element, element, element, getNamespaceForPrefix, getNamespaceForURI, getParent, getQName, getStringValue, getText, indexOf, node, nodeCount, nodeIterator, processingInstruction, processingInstructions, processingInstructions, remove, removeNode, removeProcessingInstruction, setAttributeList, setAttributes, setContent, setDocument, setParent, setQName, supportsParentMethods inherited from class org.dom4j.tree.AbstractElement
accept, add, add, add, add, add, add, add, add, addAttribute, addAttribute, addCDATA, addComment, addElement, addEntity, addNamespace, addNewNode, addNode, addNode, addProcessingInstruction, addProcessingInstruction, addText, appendAttributes, asXML, attributeValue, attributeValue, attributeValue, attributeValue, childAdded, childRemoved, createAttributeList, createAttributeList, createCopy, createCopy, createCopy, createElement, createElement, createSingleIterator, elementIterator, elementIterator, elementIterator, elementIterator, elements, elements, elements, elements, elementText, elementText, elementTextTrim, elementTextTrim, ensureAttributesCapacity, getData, getName, getNamespace, getNamespacePrefix, getNamespacesForURI, getNodeType, getPath, getQName, getQualifiedName, getUniquePath, getXPathNameStep, getXPathResult, hasMixedContent, isRootElement, isTextOnly, normalize, remove, remove, remove, remove, remove, remove, remove, remove, setAttributes, setAttributeValue, setAttributeValue, setData, setName, setNamespace, setText, toString, writeMethods inherited from class org.dom4j.tree.AbstractBranch
addElement, addElement, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getTextTrim, hasContent, invalidNodeTypeAddException, isReadOnly, setProcessingInstructionsMethods inherited from class org.dom4j.tree.AbstractNode
asXPathResult, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOfMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.dom4j.Branch
addElement, addElement, appendContent, content, elementByID, setProcessingInstructionsMethods inherited from interface org.dom4j.Element
getTextTrimMethods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNSMethods inherited from interface org.dom4j.Node
asXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOfMethods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Constructor Details
-
CSSStylableElement
-
CSSStylableElement
-
CSSStylableElement
-
-
Method Details
-
getOwnerDocument
TheXHTMLDocumentobject which is the root ancestor of this node.This is also the
XHTMLDocumentobject used to create new nodes.- Specified by:
getOwnerDocumentin interfaceCSSNode- Specified by:
getOwnerDocumentin interfaceNode- Overrides:
getOwnerDocumentin classDOMElement- Returns:
- the
XHTMLDocumentobject which is the root ancestor of this node, ornullif this node is anXHTMLDocument, aDocumentTypewhich is not used inside anyXHTMLDocumentyet, or this node is not part of a document.
-
getDocument
- Specified by:
getDocumentin interfaceNode- Overrides:
getDocumentin classDefaultElement
-
getDocumentFactory
- Overrides:
getDocumentFactoryin classDOMElement
-
setAttributeNode
- Specified by:
setAttributeNodein interfaceElement- Overrides:
setAttributeNodein classDOMElement- Throws:
DOMException
-
setAttributeNodeNS
- Specified by:
setAttributeNodeNSin interfaceElement- Overrides:
setAttributeNodeNSin classDOMElement- Throws:
DOMException
-
attribute
- Overrides:
attributein classDOMElement
-
getBaseURI
- Specified by:
getBaseURIin interfaceNode- Overrides:
getBaseURIin classDOMElement
-
getFeature
Deprecated.- Specified by:
getFeaturein interfaceNode- Overrides:
getFeaturein classDOMElement
-
setIdAttribute
Deprecated.- Specified by:
setIdAttributein interfaceElement- Overrides:
setIdAttributein classDOMElement- Throws:
DOMException
-
setIdAttributeNS
@Deprecated public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException Deprecated.- Specified by:
setIdAttributeNSin interfaceElement- Overrides:
setIdAttributeNSin classDOMElement- Throws:
DOMException
-
setIdAttributeNode
Deprecated.- Specified by:
setIdAttributeNodein interfaceElement- Overrides:
setIdAttributeNodein classDOMElement
-
getId
Gets theidattribute of this element.- Specified by:
getIdin interfaceCSSElement- Returns:
- the
idattribute, or the empty string if has no ID.
-
getStyle
Gets the inline style declaration from the current contents of thestyleXHTML attribute.- Specified by:
getStylein interfaceCSSElement- Returns:
- the style declaration, or
nullif the element has nostyleattribute.
-
hasPresentationalHints
public boolean hasPresentationalHints()Description copied from interface:CSSElementCheck whether this element has non-CSS presentational hints.A document may contain non-CSS presentational hints (like the
widthattribute in HTML). This method can returntrueonly if this specific element do contain such hints, which can be exported to a style declaration by using theCSSElement.exportHintsToStyle(CSSStyleDeclaration)method.- Specified by:
hasPresentationalHintsin interfaceCSSElement- Returns:
trueif this element has presentational hints.
-
exportHintsToStyle
Description copied from interface:CSSElementExport this element's non-CSS presentational hints (if any) to the suppliedCSSStyleDeclaration.- Specified by:
exportHintsToStylein interfaceCSSElement- Parameters:
style- the style declaration to export to.
-
hasOverrideStyle
Description copied from interface:CSSElementCheck whether this element has an override style declaration for the given pseudo-element.This method allows checking for override styles without the overhead of producing and retrieving one with
CSSElement.getOverrideStyle(Condition)and checking its length.- Specified by:
hasOverrideStylein interfaceCSSElement- Parameters:
pseudoElt- the pseudo-element condition, ornullif none.- Returns:
trueif this element has an override style declaration forpseudoElt.
-
getOverrideStyle
Description copied from interface:CSSElementGets this element's override style declaration for a pseudo-element.The getOverrideStyle method provides a mechanism through which a DOM author could effect immediate change to the style of an element without modifying the explicitly linked style sheets of a document or the inline style of elements.
The override style sheet comes after the author style sheet in the cascade algorithm.
- Specified by:
getOverrideStylein interfaceCSSElement- Parameters:
pseudoElt- the pseudo-element condition, ornullif none.- Returns:
- the override style sheet for the given pseudo-element.
-
getComputedStyle
Gets the computed style declaration that applies to this element.- Specified by:
getComputedStylein interfaceCSSElement- Parameters:
pseudoElt- the pseudo-element name.- Returns:
- the computed style declaration.
-
getComputedStyle
Gets the computed style declaration that applies to this element.- Returns:
- the computed style declaration, or null if none applies.
-
getSelectorMatcher
Gets the selector matcher for this element.- Specified by:
getSelectorMatcherin interfaceCSSElement- Returns:
- the selector matcher.
-
matches
Description copied from interface:CSSElementDoes this element (with the provided pseudo-element, if any) match the provided selector string ?- Specified by:
matchesin interfaceCSSElement- Parameters:
selectorString- the selector string.pseudoElement- the pseudo-element, or null if none.- Returns:
trueif the element would be selected by the specified selector string, false otherwise.- Throws:
DOMException- SYNTAX_ERR if there was an error parsing the selector string.
-
matches
Description copied from interface:CSSElementDoes this element (with the provided pseudo-element, if any) match the provided selector list ?- Specified by:
matchesin interfaceCSSElement- Parameters:
selist- the selector list.pseudoElement- the pseudo-element condition, ornullif none.- Returns:
trueif the element would be selected by at least one selector in the specified list,falseotherwise.
-