Class SVGOMDocument

    • Field Detail

      • RESOURCES

        protected static final java.lang.String RESOURCES
        The error messages bundle class name.
        See Also:
        Constant Field Values
      • localizableSupport

        protected transient LocalizableSupport localizableSupport
        The localizable support for the error messages.
      • referrer

        protected java.lang.String referrer
        The string representing the referrer.
      • url

        protected ParsedURL url
        The URL of the document.
      • readonly

        protected transient boolean readonly
        Is this document immutable?
      • isSVG12

        protected boolean isSVG12
        Whether the document supports SVG 1.2.
      • cssNavigableDocumentListeners

        protected java.util.HashMap cssNavigableDocumentListeners
        Map of CSSNavigableDocumentListeners to an array of wrapper DOM listeners.
      • animatedAttributeListeners

        protected java.util.LinkedList animatedAttributeListeners
        List of AnimatedAttributeListeners attached to this document.
      • svgContext

        protected transient SVGContext svgContext
        The SVG context.
    • Constructor Detail

      • SVGOMDocument

        protected SVGOMDocument()
        Creates a new uninitialized document.
      • SVGOMDocument

        public SVGOMDocument​(org.w3c.dom.DocumentType dt,
                             org.w3c.dom.DOMImplementation impl)
        Creates a new document.
    • Method Detail

      • formatMessage

        public java.lang.String formatMessage​(java.lang.String key,
                                              java.lang.Object[] args)
                                       throws java.util.MissingResourceException
        Specified by:
        formatMessage in interface Localizable
        Overrides:
        formatMessage in class AbstractDocument
        Parameters:
        key - The key used to retreive the message from the resource bundle.
        args - The objects that compose the message.
        Throws:
        java.util.MissingResourceException - if the key is not in the bundle.
      • getTitle

        public java.lang.String getTitle()
        DOM: Implements SVGDocument.getTitle().
        Specified by:
        getTitle in interface org.w3c.dom.svg.SVGDocument
      • getReferrer

        public java.lang.String getReferrer()
        DOM: Implements SVGDocument.getReferrer().
        Specified by:
        getReferrer in interface org.w3c.dom.svg.SVGDocument
      • setReferrer

        public void setReferrer​(java.lang.String s)
        Sets the referrer string.
      • getDomain

        public java.lang.String getDomain()
        DOM: Implements SVGDocument.getDomain().
        Specified by:
        getDomain in interface org.w3c.dom.svg.SVGDocument
      • getRootElement

        public org.w3c.dom.svg.SVGSVGElement getRootElement()
        DOM: Implements SVGDocument.getRootElement().
        Specified by:
        getRootElement in interface org.w3c.dom.svg.SVGDocument
      • getURL

        public java.lang.String getURL()
        DOM: Implements SVGDocument.getURL()
        Specified by:
        getURL in interface org.w3c.dom.svg.SVGDocument
      • getURLObject

        public java.net.URL getURLObject()
        Returns the URI of the document. If the document URI cannot be represented as a URL (for example if it uses a data: URI scheme), then null will be returned.
      • getParsedURL

        public ParsedURL getParsedURL()
        Returns the URI of the document.
      • setURLObject

        public void setURLObject​(java.net.URL url)
        Sets the URI of the document.
      • setParsedURL

        public void setParsedURL​(ParsedURL url)
        Sets the URI of the document.
      • setDocumentURI

        public void setDocumentURI​(java.lang.String uri)
        DOM: Implements Document.setDocumentURI(String).
        Specified by:
        setDocumentURI in interface org.w3c.dom.Document
        Overrides:
        setDocumentURI in class AbstractDocument
      • createElement

        public org.w3c.dom.Element createElement​(java.lang.String tagName)
                                          throws org.w3c.dom.DOMException
        DOM: Implements Document.createElement(String).
        Specified by:
        createElement in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
      • createDocumentFragment

        public org.w3c.dom.DocumentFragment createDocumentFragment()
        DOM: Implements Document.createDocumentFragment().
        Specified by:
        createDocumentFragment in interface org.w3c.dom.Document
      • createTextNode

        public org.w3c.dom.Text createTextNode​(java.lang.String data)
        DOM: Implements Document.createTextNode(String).
        Specified by:
        createTextNode in interface org.w3c.dom.Document
      • createComment

        public org.w3c.dom.Comment createComment​(java.lang.String data)
        DOM: Implements Document.createComment(String).
        Specified by:
        createComment in interface org.w3c.dom.Document
      • createCDATASection

        public org.w3c.dom.CDATASection createCDATASection​(java.lang.String data)
                                                    throws org.w3c.dom.DOMException
        DOM: Implements Document.createCDATASection(String)
        Specified by:
        createCDATASection in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
      • createProcessingInstruction

        public org.w3c.dom.ProcessingInstruction createProcessingInstruction​(java.lang.String target,
                                                                             java.lang.String data)
                                                                      throws org.w3c.dom.DOMException
        DOM: Implements Document.createProcessingInstruction(String,String).
        Specified by:
        createProcessingInstruction in interface org.w3c.dom.Document
        Returns:
        a SVGStyleSheetProcessingInstruction if target is "xml-stylesheet" or a GenericProcessingInstruction otherwise.
        Throws:
        org.w3c.dom.DOMException
      • createAttribute

        public org.w3c.dom.Attr createAttribute​(java.lang.String name)
                                         throws org.w3c.dom.DOMException
        DOM: Implements Document.createAttribute(String).
        Specified by:
        createAttribute in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
      • createEntityReference

        public org.w3c.dom.EntityReference createEntityReference​(java.lang.String name)
                                                          throws org.w3c.dom.DOMException
        DOM: Implements Document.createEntityReference(String).
        Specified by:
        createEntityReference in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
      • createAttributeNS

        public org.w3c.dom.Attr createAttributeNS​(java.lang.String namespaceURI,
                                                  java.lang.String qualifiedName)
                                           throws org.w3c.dom.DOMException
        DOM: Implements Document.createAttributeNS(String,String).
        Specified by:
        createAttributeNS in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
      • createElementNS

        public org.w3c.dom.Element createElementNS​(java.lang.String namespaceURI,
                                                   java.lang.String qualifiedName)
                                            throws org.w3c.dom.DOMException
        DOM: Implements Document.createElementNS(String,String).
        Specified by:
        createElementNS in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
      • isSVG12

        public boolean isSVG12()
        Returns whether the document supports SVG 1.2.
      • setIsSVG12

        public void setIsSVG12​(boolean b)
        Sets whether the document supports SVG 1.2.
      • isId

        public boolean isId​(org.w3c.dom.Attr node)
        Returns true if the given Attr node represents an 'id' for this document.
        Specified by:
        isId in class AbstractDocument
      • setSVGContext

        public void setSVGContext​(SVGContext ctx)
        Sets the SVG context to use to get SVG specific informations.
        Parameters:
        ctx - the SVG context
      • getSVGContext

        public SVGContext getSVGContext()
        Returns the SVG context used to get SVG specific informations.
      • overrideStyleTextChanged

        protected void overrideStyleTextChanged​(CSSStylableElement e,
                                                java.lang.String text)
        The text of the override style declaration for this element has been modified.
      • overrideStylePropertyRemoved

        protected void overrideStylePropertyRemoved​(CSSStylableElement e,
                                                    java.lang.String name)
        A property in the override style declaration has been removed.
      • overrideStylePropertyChanged

        protected void overrideStylePropertyChanged​(CSSStylableElement e,
                                                    java.lang.String name,
                                                    java.lang.String value,
                                                    java.lang.String prio)
        A property in the override style declaration has been changed.
      • getOverrideStyle

        public org.w3c.dom.css.CSSStyleDeclaration getOverrideStyle​(org.w3c.dom.Element elt,
                                                                    java.lang.String pseudoElt)
        DOM: Implements DocumentCSS.getOverrideStyle(Element,String).
        Specified by:
        getOverrideStyle in interface org.w3c.dom.css.DocumentCSS
        Overrides:
        getOverrideStyle in class AbstractStylableDocument
      • isReadonly

        public boolean isReadonly()
        Tests whether this node is readonly.
        Specified by:
        isReadonly in interface ExtendedNode
      • setReadonly

        public void setReadonly​(boolean v)
        Sets this node readonly attribute.
        Specified by:
        setReadonly in interface ExtendedNode
      • newNode

        protected org.w3c.dom.Node newNode()
        Returns a new uninitialized instance of this object's class.
        Specified by:
        newNode in class AbstractNode
      • copyInto

        protected org.w3c.dom.Node copyInto​(org.w3c.dom.Node n)
        Copy the fields of the current node into the given node.
        Overrides:
        copyInto in class AbstractDocument
        Parameters:
        n - a node of the type of this.
      • deepCopyInto

        protected org.w3c.dom.Node deepCopyInto​(org.w3c.dom.Node n)
        Deeply copy the fields of the current node into the given node.
        Overrides:
        deepCopyInto in class AbstractDocument
        Parameters:
        n - a node of the type of this.