summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/kitfox/svg/animation/SetSmil.java
diff options
context:
space:
mode:
authorkitfox2009-04-23 23:44:56 +0200
committerkitfox2009-04-23 23:44:56 +0200
commit71d652c248ea25c91281e127ddde85c6ff7e7683 (patch)
tree13ff926d8bc121964d9e1a4134a8d04d082fd49d /src/main/java/com/kitfox/svg/animation/SetSmil.java
parentGradient references are now handled as URIs rather than being referenced dire... (diff)
downloadsvg-salamander-core-71d652c248ea25c91281e127ddde85c6ff7e7683.tar.gz
svg-salamander-core-71d652c248ea25c91281e127ddde85c6ff7e7683.tar.xz
svg-salamander-core-71d652c248ea25c91281e127ddde85c6ff7e7683.zip
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
Diffstat (limited to 'src/main/java/com/kitfox/svg/animation/SetSmil.java')
-rw-r--r--src/main/java/com/kitfox/svg/animation/SetSmil.java22
1 files changed, 20 insertions, 2 deletions
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;
+ }
+ }
}