Class SVGOMAnimatedNumber

  • All Implemented Interfaces:
    AnimatedLiveAttributeValue, LiveAttributeValue, org.w3c.dom.svg.SVGAnimatedNumber

    public class SVGOMAnimatedNumber
    extends AbstractSVGAnimatedValue
    implements org.w3c.dom.svg.SVGAnimatedNumber
    This class implements the SVGAnimatedNumber interface.
    Version:
    $Id: SVGOMAnimatedNumber.java 1733416 2016-03-03 07:07:13Z gadams $
    • Field Detail

      • defaultValue

        protected float defaultValue
        The default value.
      • allowPercentage

        protected boolean allowPercentage
        Whether the parsed number can be a percentage.
      • valid

        protected boolean valid
        Whether the base value is valid.
      • baseVal

        protected float baseVal
        The current base value.
      • animVal

        protected float animVal
        The current animated value.
      • changing

        protected boolean changing
        Whether the value is changing.
    • Constructor Detail

      • SVGOMAnimatedNumber

        public SVGOMAnimatedNumber​(AbstractElement elt,
                                   java.lang.String ns,
                                   java.lang.String ln,
                                   float val)
        Creates a new SVGOMAnimatedNumber.
        Parameters:
        elt - The associated element.
        ns - The attribute's namespace URI.
        ln - The attribute's local name.
        val - The default value, if the attribute is not specified.
      • SVGOMAnimatedNumber

        public SVGOMAnimatedNumber​(AbstractElement elt,
                                   java.lang.String ns,
                                   java.lang.String ln,
                                   float val,
                                   boolean allowPercentage)
        Creates a new SVGOMAnimatedNumber possibly parsing it as a percentage.
        Parameters:
        elt - The associated element.
        ns - The attribute's namespace URI.
        ln - The attribute's local name.
        val - The default value, if the attribute is not specified.
        allowPercentage - Allows number specified as a percentage.
    • Method Detail

      • getBaseVal

        public float getBaseVal()
        DOM: Implements SVGAnimatedNumber.getBaseVal().
        Specified by:
        getBaseVal in interface org.w3c.dom.svg.SVGAnimatedNumber
      • update

        protected void update()
        Updates the base value from the attribute.
      • setBaseVal

        public void setBaseVal​(float baseVal)
                        throws org.w3c.dom.DOMException
        DOM: Implements SVGAnimatedNumber.setBaseVal(float).
        Specified by:
        setBaseVal in interface org.w3c.dom.svg.SVGAnimatedNumber
        Throws:
        org.w3c.dom.DOMException
      • getAnimVal

        public float getAnimVal()
        DOM: Implements SVGAnimatedNumber.getAnimVal().
        Specified by:
        getAnimVal in interface org.w3c.dom.svg.SVGAnimatedNumber
      • attrAdded

        public void attrAdded​(org.w3c.dom.Attr node,
                              java.lang.String newv)
        Called when an Attr node has been added.
        Specified by:
        attrAdded in interface LiveAttributeValue
      • attrModified

        public void attrModified​(org.w3c.dom.Attr node,
                                 java.lang.String oldv,
                                 java.lang.String newv)
        Called when an Attr node has been modified.
        Specified by:
        attrModified in interface LiveAttributeValue
      • attrRemoved

        public void attrRemoved​(org.w3c.dom.Attr node,
                                java.lang.String oldv)
        Called when an Attr node has been removed.
        Specified by:
        attrRemoved in interface LiveAttributeValue