Class AbstractElement

All Implemented Interfaces:
XMLConstants, CSSNavigableNode, NodeEventTarget, ExtendedNode, NodeXBL, XBLManagerData, CSSConstants, SVGConstants, ElementTraversal, Serializable, Element, EventTarget, Node
Direct Known Subclasses:
SVGOMElement

public abstract class AbstractElement extends AbstractElement implements CSSNavigableNode, SVGConstants
This class provides a superclass to implement an SVG element, or an element interoperable with the SVG elements.
See Also:
  • Field Details

  • Constructor Details

    • AbstractElement

      protected AbstractElement()
      Creates a new Element object.
    • AbstractElement

      protected AbstractElement(String prefix, AbstractDocument owner)
      Creates a new Element object.
      Parameters:
      prefix - The namespace prefix.
      owner - The owner document.
  • Method Details

    • getCSSParentNode

      public Node getCSSParentNode()
      Returns the CSS parent node of this node.
      Specified by:
      getCSSParentNode in interface CSSNavigableNode
    • getCSSPreviousSibling

      public Node getCSSPreviousSibling()
      Returns the CSS previous sibling node of this node.
      Specified by:
      getCSSPreviousSibling in interface CSSNavigableNode
    • getCSSNextSibling

      public Node getCSSNextSibling()
      Returns the CSS next sibling node of this node.
      Specified by:
      getCSSNextSibling in interface CSSNavigableNode
    • getCSSFirstChild

      public Node getCSSFirstChild()
      Returns the CSS first child node of this node.
      Specified by:
      getCSSFirstChild in interface CSSNavigableNode
    • getCSSLastChild

      public Node getCSSLastChild()
      Returns the CSS last child of this node.
      Specified by:
      getCSSLastChild in interface CSSNavigableNode
    • isHiddenFromSelectors

      public boolean isHiddenFromSelectors()
      Returns whether this node is the root of a (conceptual) hidden tree that selectors will not work across.
      Specified by:
      isHiddenFromSelectors in interface CSSNavigableNode
    • fireDOMAttrModifiedEvent

      public void fireDOMAttrModifiedEvent(String name, Attr node, String oldv, String newv, short change)
      Description copied from class: AbstractElement
      Fires a DOMAttrModified event. WARNING: public accessor because of compilation problems on Solaris. Do not change.
      Overrides:
      fireDOMAttrModifiedEvent in class AbstractElement
      Parameters:
      name - The attribute's name.
      node - The attribute's node.
      oldv - The old value of the attribute.
      newv - The new value of the attribute.
      change - The modification type.
    • getLiveAttributeValue

      public LiveAttributeValue getLiveAttributeValue(String ns, String ln)
      Returns the live attribute value associated with given attribute, if any.
      Parameters:
      ns - The attribute's namespace.
      ln - The attribute's local name.
    • putLiveAttributeValue

      public void putLiveAttributeValue(String ns, String ln, LiveAttributeValue val)
      Associates a live attribute value to this element.
      Parameters:
      ns - The attribute's namespace.
      ln - The attribute's local name.
      val - The live value.
    • getAttributeInitializer

      protected AttributeInitializer getAttributeInitializer()
      Returns the AttributeInitializer for this element type.
      Returns:
      null if this element has no attribute with a default value.
    • initializeAttributes

      protected void initializeAttributes()
      Initializes the attributes of this element to their default value.
    • resetAttribute

      protected boolean resetAttribute(String ns, String prefix, String ln)
      Resets an attribute to the default value.
      Returns:
      true if a default value is known for the given attribute.
    • createAttributes

      protected NamedNodeMap createAttributes()
      Creates the attribute list.
      Overrides:
      createAttributes in class AbstractElement
    • setUnspecifiedAttribute

      public void setUnspecifiedAttribute(String nsURI, String name, String value)
      Sets an unspecified attribute.
      Parameters:
      nsURI - The attribute namespace URI.
      name - The attribute's qualified name.
      value - The attribute's default value.
    • attrAdded

      protected void attrAdded(Attr node, String newv)
      Called when an attribute has been added.
      Overrides:
      attrAdded in class AbstractElement
    • attrModified

      protected void attrModified(Attr node, String oldv, String newv)
      Called when an attribute has been modified.
      Overrides:
      attrModified in class AbstractElement
    • attrRemoved

      protected void attrRemoved(Attr node, String oldv)
      Called when an attribute has been removed.
      Overrides:
      attrRemoved in class AbstractElement
    • export

      protected Node export(Node n, AbstractDocument d)
      Exports this node to the given document.
      Overrides:
      export in class AbstractElement
      Parameters:
      n - The clone node.
      d - The destination document.
    • deepExport

      protected Node deepExport(Node n, AbstractDocument d)
      Deeply exports this node to the given document.
      Overrides:
      deepExport in class AbstractElement
      Parameters:
      n - The clone node.
      d - The destination document.