Class SVGOMElement

    • Field Detail

      • xmlTraitInformation

        protected static DoublyIndexedTable xmlTraitInformation
        Table mapping XML attribute names to TraitInformation objects.
      • readonly

        protected transient boolean readonly
        Is this element immutable?
      • prefix

        protected java.lang.String prefix
        The element prefix.
      • svgContext

        protected transient SVGContext svgContext
        The SVG context to get SVG specific informations.
    • Constructor Detail

      • SVGOMElement

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

        protected SVGOMElement​(java.lang.String prefix,
                               AbstractDocument owner)
        Creates a new Element object.
        Parameters:
        prefix - The namespace prefix.
        owner - The owner document.
    • Method Detail

      • initializeAllLiveAttributes

        protected void initializeAllLiveAttributes()
        Initializes all live attributes for this element.
      • getId

        public java.lang.String getId()
        DOM: Implements SVGElement.getId().
        Specified by:
        getId in interface org.w3c.dom.svg.SVGElement
        Overrides:
        getId in class AbstractElement
      • setId

        public void setId​(java.lang.String id)
        DOM: Implements SVGElement.setId(String).
        Specified by:
        setId in interface org.w3c.dom.svg.SVGElement
      • getXMLbase

        public java.lang.String getXMLbase()
        DOM: Implements SVGElement.getXMLbase().
        Specified by:
        getXMLbase in interface org.w3c.dom.svg.SVGElement
      • setXMLbase

        public void setXMLbase​(java.lang.String xmlbase)
                        throws org.w3c.dom.DOMException
        DOM: Implements SVGElement.setXMLbase(String).
        Specified by:
        setXMLbase in interface org.w3c.dom.svg.SVGElement
        Throws:
        org.w3c.dom.DOMException
      • getOwnerSVGElement

        public org.w3c.dom.svg.SVGSVGElement getOwnerSVGElement()
        DOM: Implements SVGElement.getOwnerSVGElement().
        Specified by:
        getOwnerSVGElement in interface org.w3c.dom.svg.SVGElement
      • getViewportElement

        public org.w3c.dom.svg.SVGElement getViewportElement()
        DOM: Implements SVGElement.getViewportElement().
        Specified by:
        getViewportElement in interface org.w3c.dom.svg.SVGElement
      • getNodeName

        public java.lang.String getNodeName()
        DOM: Implements Node.getNodeName().
        Specified by:
        getNodeName in interface org.w3c.dom.Node
      • getNamespaceURI

        public java.lang.String getNamespaceURI()
        DOM: Implements Node.getNamespaceURI().
        Specified by:
        getNamespaceURI in interface org.w3c.dom.Node
        Overrides:
        getNamespaceURI in class AbstractNode
        Returns:
        null.
      • setPrefix

        public void setPrefix​(java.lang.String prefix)
                       throws org.w3c.dom.DOMException
        DOM: Implements Node.setPrefix(String).
        Specified by:
        setPrefix in interface org.w3c.dom.Node
        Overrides:
        setPrefix in class AbstractNode
        Throws:
        org.w3c.dom.DOMException
      • getCascadedXMLBase

        protected java.lang.String getCascadedXMLBase​(org.w3c.dom.Node node)
        Returns the xml:base attribute value of the given element, resolving any dependency on parent bases if needed. Follows shadow trees when moving to parent nodes.
        Overrides:
        getCascadedXMLBase in class AbstractNode
      • 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.
      • createSVGException

        public org.w3c.dom.svg.SVGException createSVGException​(short type,
                                                               java.lang.String key,
                                                               java.lang.Object[] args)
        Creates an SVGException with the appropriate error message.
      • 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
      • getTraitInformationTable

        protected DoublyIndexedTable getTraitInformationTable()
        Returns the table of TraitInformation objects for this element.
      • createLiveAnimatedTransformList

        protected SVGOMAnimatedTransformList createLiveAnimatedTransformList​(java.lang.String ns,
                                                                             java.lang.String ln,
                                                                             java.lang.String def)
        Creates a new SVGOMAnimatedTransformList and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedBoolean

        protected SVGOMAnimatedBoolean createLiveAnimatedBoolean​(java.lang.String ns,
                                                                 java.lang.String ln,
                                                                 boolean def)
        Creates a new SVGOMAnimatedBoolean and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedString

        protected SVGOMAnimatedString createLiveAnimatedString​(java.lang.String ns,
                                                               java.lang.String ln)
        Creates a new SVGOMAnimatedString and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedPathData

        protected SVGOMAnimatedPathData createLiveAnimatedPathData​(java.lang.String ns,
                                                                   java.lang.String ln,
                                                                   java.lang.String def)
        Creates a new SVGOMAnimatedPathData and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedNumber

        protected SVGOMAnimatedNumber createLiveAnimatedNumber​(java.lang.String ns,
                                                               java.lang.String ln,
                                                               float def)
        Creates a new SVGOMAnimatedNumber and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedNumber

        protected SVGOMAnimatedNumber createLiveAnimatedNumber​(java.lang.String ns,
                                                               java.lang.String ln,
                                                               float def,
                                                               boolean allowPercentage)
        Creates a new SVGOMAnimatedNumber that can be parsed as a percentage and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedNumberList

        protected SVGOMAnimatedNumberList createLiveAnimatedNumberList​(java.lang.String ns,
                                                                       java.lang.String ln,
                                                                       java.lang.String def,
                                                                       boolean canEmpty)
        Creates a new SVGOMAnimatedNumberList and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedPoints

        protected SVGOMAnimatedPoints createLiveAnimatedPoints​(java.lang.String ns,
                                                               java.lang.String ln,
                                                               java.lang.String def)
        Creates a new SVGOMAnimatedPoints and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedLengthList

        protected SVGOMAnimatedLengthList createLiveAnimatedLengthList​(java.lang.String ns,
                                                                       java.lang.String ln,
                                                                       java.lang.String def,
                                                                       boolean emptyAllowed,
                                                                       short dir)
        Creates a new SVGOMAnimatedLengthList and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedInteger

        protected SVGOMAnimatedInteger createLiveAnimatedInteger​(java.lang.String ns,
                                                                 java.lang.String ln,
                                                                 int def)
        Creates a new SVGOMAnimatedInteger and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedEnumeration

        protected SVGOMAnimatedEnumeration createLiveAnimatedEnumeration​(java.lang.String ns,
                                                                         java.lang.String ln,
                                                                         java.lang.String[] val,
                                                                         short def)
        Creates a new SVGOMAnimatedEnumeration and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedLength

        protected SVGOMAnimatedLength createLiveAnimatedLength​(java.lang.String ns,
                                                               java.lang.String ln,
                                                               java.lang.String val,
                                                               short dir,
                                                               boolean nonneg)
        Creates a new SVGOMAnimatedLength and stores it in this element's LiveAttributeValue table.
      • createLiveAnimatedRect

        protected SVGOMAnimatedRect createLiveAnimatedRect​(java.lang.String ns,
                                                           java.lang.String ln,
                                                           java.lang.String value)
        Creates a new SVGOMAnimatedRect and stores it in this element's LiveAttributeValue table.
      • hasProperty

        public boolean hasProperty​(java.lang.String pn)
        Returns whether the given CSS property is available on this element.
        Specified by:
        hasProperty in interface ExtendedTraitAccess
      • hasTrait

        public boolean hasTrait​(java.lang.String ns,
                                java.lang.String ln)
        Returns whether the given trait is available on this element.
        Specified by:
        hasTrait in interface ExtendedTraitAccess
      • isPropertyAnimatable

        public boolean isPropertyAnimatable​(java.lang.String pn)
        Returns whether the given CSS property is animatable.
        Specified by:
        isPropertyAnimatable in interface ExtendedTraitAccess
      • isAttributeAnimatable

        public final boolean isAttributeAnimatable​(java.lang.String ns,
                                                   java.lang.String ln)
        Returns whether the given XML attribute is animatable.
        Specified by:
        isAttributeAnimatable in interface ExtendedTraitAccess
      • isPropertyAdditive

        public boolean isPropertyAdditive​(java.lang.String pn)
        Returns whether the given CSS property is additive.
        Specified by:
        isPropertyAdditive in interface ExtendedTraitAccess
      • isAttributeAdditive

        public boolean isAttributeAdditive​(java.lang.String ns,
                                           java.lang.String ln)
        Returns whether the given XML attribute is additive.
        Specified by:
        isAttributeAdditive in interface ExtendedTraitAccess
      • isTraitAnimatable

        public boolean isTraitAnimatable​(java.lang.String ns,
                                         java.lang.String tn)
        Returns whether the given trait is animatable.
        Specified by:
        isTraitAnimatable in interface ExtendedTraitAccess
      • isTraitAdditive

        public boolean isTraitAdditive​(java.lang.String ns,
                                       java.lang.String tn)
        Returns whether the given trait is additive.
        Specified by:
        isTraitAdditive in interface ExtendedTraitAccess
      • getPropertyType

        public int getPropertyType​(java.lang.String pn)
        Returns the type of the given property.
        Specified by:
        getPropertyType in interface ExtendedTraitAccess
      • getAttributeType

        public final int getAttributeType​(java.lang.String ns,
                                          java.lang.String ln)
        Returns the type of the given attribute.
        Specified by:
        getAttributeType in interface ExtendedTraitAccess
      • getElement

        public org.w3c.dom.Element getElement()
        Returns the element.
        Specified by:
        getElement in interface AnimationTarget
      • getBaseValue

        protected AnimatableValue getBaseValue​(org.w3c.dom.svg.SVGAnimatedInteger n,
                                               org.w3c.dom.svg.SVGAnimatedInteger on)
        Returns an AnimatableNumberOptionalNumberValue for the base value of the given two SVGAnimatedIntegers.
      • getBaseValue

        protected AnimatableValue getBaseValue​(org.w3c.dom.svg.SVGAnimatedNumber n,
                                               org.w3c.dom.svg.SVGAnimatedNumber on)
        Returns an AnimatableNumberOptionalNumberValue for the base value of the given two SVGAnimatedNumbers.
      • getPercentageInterpretation

        public short getPercentageInterpretation​(java.lang.String ns,
                                                 java.lang.String an,
                                                 boolean isCSS)
        Gets how percentage values are interpreted by the given attribute or property.
        Specified by:
        getPercentageInterpretation in interface AnimationTarget
      • getAttributePercentageInterpretation

        protected final short getAttributePercentageInterpretation​(java.lang.String ns,
                                                                   java.lang.String ln)
        Gets how percentage values are interpreted by the given attribute.
      • useLinearRGBColorInterpolation

        public boolean useLinearRGBColorInterpolation()
        Returns whether color interpolations should be done in linear RGB color space rather than sRGB. Overriden in SVGStylableElement to actually look up the 'color-interpolation' property.
        Specified by:
        useLinearRGBColorInterpolation in interface AnimationTarget
      • svgToUserSpace

        public float svgToUserSpace​(float v,
                                    short type,
                                    short pcInterp)
        Converts the given SVG length into user units.
        Specified by:
        svgToUserSpace in interface AnimationTarget
        Parameters:
        v - the SVG length value
        type - the SVG length units (one of the SVGLength.SVG_LENGTH_* constants)
        pcInterp - how to interpretet percentage values (one of the SVGContext.PERCENTAGE_* constants)
        Returns:
        the SVG value in user units
      • fireBaseAttributeListeners

        void fireBaseAttributeListeners​(java.lang.String ns,
                                        java.lang.String ln)
        Fires the listeners registered for changes to the base value of the given attribute.
      • export

        protected org.w3c.dom.Node export​(org.w3c.dom.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 org.w3c.dom.Node deepExport​(org.w3c.dom.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.
      • 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 AbstractElement
        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 AbstractElement
        Parameters:
        n - a node of the type of this.