|
|
@ -78,7 +78,7 @@ import org.apache.batik.parser.PreserveAspectRatioHandler; |
|
|
|
import org.apache.batik.parser.PreserveAspectRatioParser; |
|
|
|
import org.apache.batik.parser.PreserveAspectRatioParser; |
|
|
|
import org.apache.batik.util.RunnableQueue; |
|
|
|
import org.apache.batik.util.RunnableQueue; |
|
|
|
import org.apache.batik.util.SMILConstants; |
|
|
|
import org.apache.batik.util.SMILConstants; |
|
|
|
import org.apache.batik.util.XMLConstants; |
|
|
|
import org.apache.batik.constants.XMLConstants; |
|
|
|
|
|
|
|
|
|
|
|
import org.w3c.dom.Document; |
|
|
|
import org.w3c.dom.Document; |
|
|
|
import org.w3c.dom.Element; |
|
|
|
import org.w3c.dom.Element; |
|
|
@ -151,9 +151,9 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected Factory[] factories = { |
|
|
|
protected Factory[] factories = { |
|
|
|
null, // TYPE_UNKNOWN
|
|
|
|
null, // TYPE_UNKNOWN
|
|
|
|
new AnimatableIntegerValueFactory(), // TYPE_INTEGER
|
|
|
|
new AnimatableIntegerValueFactory(), // TYPE_INTEGER
|
|
|
|
new AnimatableNumberValueFactory(), // TYPE_NUMBER
|
|
|
|
new AnimatableNumberValueFactory(), // TYPE_NUMBER
|
|
|
|
new AnimatableLengthValueFactory(), // TYPE_LENGTH
|
|
|
|
new AnimatableLengthValueFactory(), // TYPE_LENGTH
|
|
|
|
null, // TYPE_NUMBER_OPTIONAL_NUMBER
|
|
|
|
null, // TYPE_NUMBER_OPTIONAL_NUMBER
|
|
|
|
new AnimatableAngleValueFactory(), // TYPE_ANGLE
|
|
|
|
new AnimatableAngleValueFactory(), // TYPE_ANGLE
|
|
|
|
new AnimatableColorValueFactory(), // TYPE_COLOR
|
|
|
|
new AnimatableColorValueFactory(), // TYPE_COLOR
|
|
|
@ -163,8 +163,8 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_URI
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_URI
|
|
|
|
null, // TYPE_FREQUENCY
|
|
|
|
null, // TYPE_FREQUENCY
|
|
|
|
null, // TYPE_TIME
|
|
|
|
null, // TYPE_TIME
|
|
|
|
new AnimatableNumberListValueFactory(), // TYPE_NUMBER_LIST
|
|
|
|
new AnimatableNumberListValueFactory(), // TYPE_NUMBER_LIST
|
|
|
|
new AnimatableLengthListValueFactory(), // TYPE_LENGTH_LIST
|
|
|
|
new AnimatableLengthListValueFactory(), // TYPE_LENGTH_LIST
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_IDENT
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_IDENT
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_CDATA
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_CDATA
|
|
|
|
animatableLengthOrIdentFactory, // TYPE_LENGTH_OR_INHERIT
|
|
|
|
animatableLengthOrIdentFactory, // TYPE_LENGTH_OR_INHERIT
|
|
|
@ -172,7 +172,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_CLIP_VALUE
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_CLIP_VALUE
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_URI_OR_IDENT
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_URI_OR_IDENT
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_CURSOR_VALUE
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_CURSOR_VALUE
|
|
|
|
new AnimatablePathDataFactory(), // TYPE_PATH_DATA
|
|
|
|
new AnimatablePathDataFactory(), // TYPE_PATH_DATA
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_ENABLE_BACKGROUND_VALUE
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_ENABLE_BACKGROUND_VALUE
|
|
|
|
null, // TYPE_TIME_VALUE_LIST
|
|
|
|
null, // TYPE_TIME_VALUE_LIST
|
|
|
|
animatableNumberOrIdentFactory, // TYPE_NUMBER_OR_INHERIT
|
|
|
|
animatableNumberOrIdentFactory, // TYPE_NUMBER_OR_INHERIT
|
|
|
@ -181,8 +181,8 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
new AnimatableNumberOrIdentFactory(true), // TYPE_FONT_WEIGHT_VALUE
|
|
|
|
new AnimatableNumberOrIdentFactory(true), // TYPE_FONT_WEIGHT_VALUE
|
|
|
|
new AnimatableAngleOrIdentFactory(), // TYPE_ANGLE_OR_IDENT
|
|
|
|
new AnimatableAngleOrIdentFactory(), // TYPE_ANGLE_OR_IDENT
|
|
|
|
null, // TYPE_KEY_SPLINES_VALUE
|
|
|
|
null, // TYPE_KEY_SPLINES_VALUE
|
|
|
|
new AnimatablePointListValueFactory(), // TYPE_POINTS_VALUE
|
|
|
|
new AnimatablePointListValueFactory(), // TYPE_POINTS_VALUE
|
|
|
|
new AnimatablePreserveAspectRatioValueFactory(), // TYPE_PRESERVE_ASPECT_RATIO_VALUE
|
|
|
|
new AnimatablePreserveAspectRatioValueFactory(), // TYPE_PRESERVE_ASPECT_RATIO_VALUE
|
|
|
|
null, // TYPE_URI_LIST
|
|
|
|
null, // TYPE_URI_LIST
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_LENGTH_LIST_OR_IDENT
|
|
|
|
uncomputedAnimatableStringValueFactory, // TYPE_LENGTH_LIST_OR_IDENT
|
|
|
|
null, // TYPE_CHARACTER_OR_UNICODE_RANGE_LIST
|
|
|
|
null, // TYPE_CHARACTER_OR_UNICODE_RANGE_LIST
|
|
|
@ -197,10 +197,10 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
animatableNumberOrIdentFactory, // TYPE_FONT_SIZE_ADJUST_VALUE
|
|
|
|
animatableNumberOrIdentFactory, // TYPE_FONT_SIZE_ADJUST_VALUE
|
|
|
|
null, // TYPE_LANG_VALUE
|
|
|
|
null, // TYPE_LANG_VALUE
|
|
|
|
null, // TYPE_LANG_LIST_VALUE
|
|
|
|
null, // TYPE_LANG_LIST_VALUE
|
|
|
|
new AnimatableNumberOrPercentageValueFactory(), // TYPE_NUMBER_OR_PERCENTAGE
|
|
|
|
new AnimatableNumberOrPercentageValueFactory(), // TYPE_NUMBER_OR_PERCENTAGE
|
|
|
|
null, // TYPE_TIMING_SPECIFIER_LIST
|
|
|
|
null, // TYPE_TIMING_SPECIFIER_LIST
|
|
|
|
new AnimatableBooleanValueFactory(), // TYPE_BOOLEAN
|
|
|
|
new AnimatableBooleanValueFactory(), // TYPE_BOOLEAN
|
|
|
|
new AnimatableRectValueFactory() // TYPE_RECT
|
|
|
|
new AnimatableRectValueFactory() // TYPE_RECT
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -258,15 +258,15 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
String[] eventNamesSVG12 = { |
|
|
|
String[] eventNamesSVG12 = { |
|
|
|
"load", "resize", "scroll", "zoom" |
|
|
|
"load", "resize", "scroll", "zoom" |
|
|
|
}; |
|
|
|
}; |
|
|
|
for (int i = 0; i < eventNamesCommon.length; i++) { |
|
|
|
for (String anEventNamesCommon : eventNamesCommon) { |
|
|
|
animationEventNames11.add(eventNamesCommon[i]); |
|
|
|
animationEventNames11.add(anEventNamesCommon); |
|
|
|
animationEventNames12.add(eventNamesCommon[i]); |
|
|
|
animationEventNames12.add(anEventNamesCommon); |
|
|
|
} |
|
|
|
} |
|
|
|
for (int i = 0; i < eventNamesSVG11.length; i++) { |
|
|
|
for (String anEventNamesSVG11 : eventNamesSVG11) { |
|
|
|
animationEventNames11.add(eventNamesSVG11[i]); |
|
|
|
animationEventNames11.add(anEventNamesSVG11); |
|
|
|
} |
|
|
|
} |
|
|
|
for (int i = 0; i < eventNamesSVG12.length; i++) { |
|
|
|
for (String anEventNamesSVG12 : eventNamesSVG12) { |
|
|
|
animationEventNames12.add(eventNamesSVG12[i]); |
|
|
|
animationEventNames12.add(anEventNamesSVG12); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -439,14 +439,14 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
timedDocumentRoot.resetDocument(cal); |
|
|
|
timedDocumentRoot.resetDocument(cal); |
|
|
|
Object[] bridges = initialBridges.toArray(); |
|
|
|
Object[] bridges = initialBridges.toArray(); |
|
|
|
initialBridges = null; |
|
|
|
initialBridges = null; |
|
|
|
for (int i = 0; i < bridges.length; i++) { |
|
|
|
for (Object bridge2 : bridges) { |
|
|
|
SVGAnimationElementBridge bridge = |
|
|
|
SVGAnimationElementBridge bridge = |
|
|
|
(SVGAnimationElementBridge) bridges[i]; |
|
|
|
(SVGAnimationElementBridge) bridge2; |
|
|
|
bridge.initializeAnimation(); |
|
|
|
bridge.initializeAnimation(); |
|
|
|
} |
|
|
|
} |
|
|
|
for (int i = 0; i < bridges.length; i++) { |
|
|
|
for (Object bridge1 : bridges) { |
|
|
|
SVGAnimationElementBridge bridge = |
|
|
|
SVGAnimationElementBridge bridge = |
|
|
|
(SVGAnimationElementBridge) bridges[i]; |
|
|
|
(SVGAnimationElementBridge) bridge1; |
|
|
|
bridge.initializeTimedElement(); |
|
|
|
bridge.initializeTimedElement(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1091,7 +1091,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatableBooleanValue}s. |
|
|
|
* Factory class for {@link AnimatableBooleanValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatableBooleanValueFactory implements Factory { |
|
|
|
protected static class AnimatableBooleanValueFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Creates a new AnimatableValue from a string. |
|
|
|
* Creates a new AnimatableValue from a string. |
|
|
@ -1114,7 +1114,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatableIntegerValue}s. |
|
|
|
* Factory class for {@link AnimatableIntegerValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatableIntegerValueFactory implements Factory { |
|
|
|
protected static class AnimatableIntegerValueFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Creates a new AnimatableValue from a string. |
|
|
|
* Creates a new AnimatableValue from a string. |
|
|
@ -1137,7 +1137,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatableNumberValue}s. |
|
|
|
* Factory class for {@link AnimatableNumberValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatableNumberValueFactory implements Factory { |
|
|
|
protected static class AnimatableNumberValueFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Creates a new AnimatableValue from a string. |
|
|
|
* Creates a new AnimatableValue from a string. |
|
|
@ -1159,7 +1159,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatableNumberOrPercentageValue}s. |
|
|
|
* Factory class for {@link AnimatableNumberOrPercentageValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatableNumberOrPercentageValueFactory |
|
|
|
protected static class AnimatableNumberOrPercentageValueFactory |
|
|
|
implements Factory { |
|
|
|
implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -1200,7 +1200,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatablePreserveAspectRatioValue}s. |
|
|
|
* Factory class for {@link AnimatablePreserveAspectRatioValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatablePreserveAspectRatioValueFactory implements Factory { |
|
|
|
protected static class AnimatablePreserveAspectRatioValueFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* The parsed 'align' value. |
|
|
|
* The parsed 'align' value. |
|
|
@ -1353,7 +1353,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatableLengthValue}s. |
|
|
|
* Factory class for {@link AnimatableLengthValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatableLengthValueFactory implements Factory { |
|
|
|
protected static class AnimatableLengthValueFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* The parsed length unit type. |
|
|
|
* The parsed length unit type. |
|
|
@ -1447,7 +1447,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatableLengthListValue}s. |
|
|
|
* Factory class for {@link AnimatableLengthListValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatableLengthListValueFactory implements Factory { |
|
|
|
protected static class AnimatableLengthListValueFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Parser for length lists. |
|
|
|
* Parser for length lists. |
|
|
@ -1498,7 +1498,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatableNumberListValue}s. |
|
|
|
* Factory class for {@link AnimatableNumberListValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatableNumberListValueFactory implements Factory { |
|
|
|
protected static class AnimatableNumberListValueFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Parser for number lists. |
|
|
|
* Parser for number lists. |
|
|
@ -1545,7 +1545,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatableNumberListValue}s. |
|
|
|
* Factory class for {@link AnimatableNumberListValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatableRectValueFactory implements Factory { |
|
|
|
protected static class AnimatableRectValueFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Parser for number lists. |
|
|
|
* Parser for number lists. |
|
|
@ -1596,7 +1596,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatablePointListValue}s. |
|
|
|
* Factory class for {@link AnimatablePointListValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatablePointListValueFactory implements Factory { |
|
|
|
protected static class AnimatablePointListValueFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Parser for point lists. |
|
|
|
* Parser for point lists. |
|
|
@ -1643,7 +1643,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatablePathDataValue}s. |
|
|
|
* Factory class for {@link AnimatablePathDataValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class AnimatablePathDataFactory implements Factory { |
|
|
|
protected static class AnimatablePathDataFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Parser for path data. |
|
|
|
* Parser for path data. |
|
|
@ -1691,7 +1691,7 @@ public class SVGAnimationEngine extends AnimationEngine { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Factory class for {@link AnimatableStringValue}s. |
|
|
|
* Factory class for {@link AnimatableStringValue}s. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected class UncomputedAnimatableStringValueFactory implements Factory { |
|
|
|
protected static class UncomputedAnimatableStringValueFactory implements Factory { |
|
|
|
|
|
|
|
|
|
|
|
public AnimatableValue createValue(AnimationTarget target, String ns, |
|
|
|
public AnimatableValue createValue(AnimationTarget target, String ns, |
|
|
|
String ln, boolean isCSS, String s) { |
|
|
|
String ln, boolean isCSS, String s) { |
|
|
|