From 71d652c248ea25c91281e127ddde85c6ff7e7683 Mon Sep 17 00:00:00 2001 From: kitfox Date: Thu, 23 Apr 2009 21:44:56 +0000 Subject: Added rebuild() to AnimateElement that will allow the user to change the xml values of animation elements. git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@64 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b --- .../java/com/kitfox/svg/animation/SetSmil.java | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/kitfox/svg/animation/SetSmil.java') diff --git a/src/main/java/com/kitfox/svg/animation/SetSmil.java b/src/main/java/com/kitfox/svg/animation/SetSmil.java index 3ada7c9..d821d4c 100644 --- a/src/main/java/com/kitfox/svg/animation/SetSmil.java +++ b/src/main/java/com/kitfox/svg/animation/SetSmil.java @@ -26,9 +26,14 @@ package com.kitfox.svg.animation; -import org.xml.sax.*; +import com.kitfox.svg.SVGElement; +import com.kitfox.svg.SVGException; +import com.kitfox.svg.SVGLoaderHelper; +import com.kitfox.svg.animation.parser.AnimTimeParser; +import com.kitfox.svg.xml.StyleAttribute; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; -import com.kitfox.svg.*; /** * Set is used to set a textual value; most likely for a style element. @@ -52,4 +57,17 @@ public class SetSmil extends AnimationElement toValue = attrs.getValue("to"); } + + protected void rebuild(AnimTimeParser animTimeParser) throws SVGException + { + super.rebuild(animTimeParser); + + StyleAttribute sty = new StyleAttribute(); + + if (getPres(sty.setName("to"))) + { + String newVal = sty.getStringValue(); + toValue = newVal; + } + } } -- cgit v1.2.3-55-g7522