You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/10/08 16:03:45 UTC
[30/62] [abbrv] [partial] Merged Apache Flex 4.9.0 release branch
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/batik-squiggle.pom.template
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/batik-squiggle.pom.template b/modules/thirdparty/batik/sources/batik-squiggle.pom.template
new file mode 100644
index 0000000..44ab2f8
--- /dev/null
+++ b/modules/thirdparty/batik/sources/batik-squiggle.pom.template
@@ -0,0 +1,146 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-squiggle</artifactId>
+ <version>@version@</version>
+ <packaging>jar</packaging>
+ <name>Batik SVG browser application</name>
+ <url>http://xmlgraphics.apache.org/batik/</url>
+ <inceptionYear>2000</inceptionYear>
+
+ <mailingLists>
+ <mailingList>
+ <name>Batik Users List</name>
+ <subscribe>batik-users-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-users-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Developer List</name>
+ <subscribe>batik-dev-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-dev-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Commit List</name>
+ <subscribe>batik-commits-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-commits-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-commits/</archive>
+ </mailingList>
+ </mailingLists>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/?root=Apache-SVN</url>
+ </scm>
+
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-awt-util</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-bridge</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-dom</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-ext</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-gui-util</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-gvt</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-script</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-svg-dom</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-swing</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-transcoder</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-util</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-xml</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.3.04</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis-ext</artifactId>
+ <version>1.3.04</version>
+ </dependency>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/batik-svg-dom.pom.template
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/batik-svg-dom.pom.template b/modules/thirdparty/batik/sources/batik-svg-dom.pom.template
new file mode 100644
index 0000000..f04f5d1
--- /dev/null
+++ b/modules/thirdparty/batik/sources/batik-svg-dom.pom.template
@@ -0,0 +1,121 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-svg-dom</artifactId>
+ <version>@version@</version>
+ <packaging>jar</packaging>
+ <name>Batik SVG DOM implementation</name>
+ <url>http://xmlgraphics.apache.org/batik/</url>
+ <inceptionYear>2000</inceptionYear>
+
+ <mailingLists>
+ <mailingList>
+ <name>Batik Users List</name>
+ <subscribe>batik-users-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-users-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Developer List</name>
+ <subscribe>batik-dev-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-dev-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Commit List</name>
+ <subscribe>batik-commits-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-commits-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-commits/</archive>
+ </mailingList>
+ </mailingLists>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/?root=Apache-SVN</url>
+ </scm>
+
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-anim</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-awt-util</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-css</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-dom</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-ext</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-parser</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-util</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.3.04</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis-ext</artifactId>
+ <version>1.3.04</version>
+ </dependency>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/batik-svggen.pom.template
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/batik-svggen.pom.template b/modules/thirdparty/batik/sources/batik-svggen.pom.template
new file mode 100644
index 0000000..67fdfa3
--- /dev/null
+++ b/modules/thirdparty/batik/sources/batik-svggen.pom.template
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-svggen</artifactId>
+ <version>@version@</version>
+ <packaging>jar</packaging>
+ <name>Batik Java2D SVG generator</name>
+ <url>http://xmlgraphics.apache.org/batik/</url>
+ <inceptionYear>2000</inceptionYear>
+
+ <mailingLists>
+ <mailingList>
+ <name>Batik Users List</name>
+ <subscribe>batik-users-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-users-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Developer List</name>
+ <subscribe>batik-dev-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-dev-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Commit List</name>
+ <subscribe>batik-commits-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-commits-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-commits/</archive>
+ </mailingList>
+ </mailingLists>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/?root=Apache-SVN</url>
+ </scm>
+
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-awt-util</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-util</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.3.04</version>
+ </dependency>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/batik-transcoder.pom.template
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/batik-transcoder.pom.template b/modules/thirdparty/batik/sources/batik-transcoder.pom.template
new file mode 100644
index 0000000..cd8f99a
--- /dev/null
+++ b/modules/thirdparty/batik/sources/batik-transcoder.pom.template
@@ -0,0 +1,161 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-transcoder</artifactId>
+ <version>@version@</version>
+ <packaging>jar</packaging>
+ <name>Batik SVG transcoder classes</name>
+ <url>http://xmlgraphics.apache.org/batik/</url>
+ <inceptionYear>2000</inceptionYear>
+
+ <mailingLists>
+ <mailingList>
+ <name>Batik Users List</name>
+ <subscribe>batik-users-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-users-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Developer List</name>
+ <subscribe>batik-dev-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-dev-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Commit List</name>
+ <subscribe>batik-commits-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-commits-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-commits/</archive>
+ </mailingList>
+ </mailingLists>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/?root=Apache-SVN</url>
+ </scm>
+
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>fop</artifactId>
+ <version>0.94</version>
+ <exclusions>
+ <exclusion>
+ <groupId>batik</groupId>
+ <artifactId>batik-svg-dom</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>batik</groupId>
+ <artifactId>batik-bridge</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>batik</groupId>
+ <artifactId>batik-awt-util</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>batik</groupId>
+ <artifactId>batik-gvt</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>batik</groupId>
+ <artifactId>batik-transcoder</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>batik</groupId>
+ <artifactId>batik-extension</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>batik</groupId>
+ <artifactId>batik-ext</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-awt-util</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-bridge</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-dom</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-gvt</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-svg-dom</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-svggen</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-util</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-xml</artifactId>
+ <version>@version@</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.3.04</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis-ext</artifactId>
+ <version>1.3.04</version>
+ </dependency>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/batik-ttf2svg.mf
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/batik-ttf2svg.mf b/modules/thirdparty/batik/sources/batik-ttf2svg.mf
deleted file mode 100644
index d209f28..0000000
--- a/modules/thirdparty/batik/sources/batik-ttf2svg.mf
+++ /dev/null
@@ -1,4 +0,0 @@
-Manifest-Version: 1.0
-Main-Class: org.apache.flex.forks.batik.apps.ttf2svg.Main
-Class-Path: lib/batik-svggen.jar \
- lib/batik-util.jar
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/batik-util.pom.template
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/batik-util.pom.template b/modules/thirdparty/batik/sources/batik-util.pom.template
new file mode 100644
index 0000000..c3b2145
--- /dev/null
+++ b/modules/thirdparty/batik/sources/batik-util.pom.template
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-util</artifactId>
+ <version>@version@</version>
+ <packaging>jar</packaging>
+ <name>Batik utility library</name>
+ <url>http://xmlgraphics.apache.org/batik/</url>
+ <inceptionYear>2000</inceptionYear>
+
+ <mailingLists>
+ <mailingList>
+ <name>Batik Users List</name>
+ <subscribe>batik-users-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-users-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Developer List</name>
+ <subscribe>batik-dev-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-dev-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Commit List</name>
+ <subscribe>batik-commits-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-commits-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-commits/</archive>
+ </mailingList>
+ </mailingLists>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/?root=Apache-SVN</url>
+ </scm>
+
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+
+ <dependencies>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/batik-xml.pom.template
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/batik-xml.pom.template b/modules/thirdparty/batik/sources/batik-xml.pom.template
new file mode 100644
index 0000000..591f865
--- /dev/null
+++ b/modules/thirdparty/batik/sources/batik-xml.pom.template
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-xml</artifactId>
+ <version>@version@</version>
+ <packaging>jar</packaging>
+ <name>Batik XML utility library</name>
+ <url>http://xmlgraphics.apache.org/batik/</url>
+ <inceptionYear>2000</inceptionYear>
+
+ <mailingLists>
+ <mailingList>
+ <name>Batik Users List</name>
+ <subscribe>batik-users-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-users-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Developer List</name>
+ <subscribe>batik-dev-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-dev-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Batik Commit List</name>
+ <subscribe>batik-commits-subscribe@xmlgraphics.apache.org</subscribe>
+ <unsubscribe>batik-commits-unsubscribe@xmlgraphics.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-commits/</archive>
+ </mailingList>
+ </mailingLists>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/?root=Apache-SVN</url>
+ </scm>
+
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>batik-util</artifactId>
+ <version>@version@</version>
+ </dependency>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/batik.mf
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/batik.mf b/modules/thirdparty/batik/sources/batik.mf
index 5dbea69..e901d94 100644
--- a/modules/thirdparty/batik/sources/batik.mf
+++ b/modules/thirdparty/batik/sources/batik.mf
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
-Main-Class: org.apache.flex.forks.batik.apps.svgbrowser.Main
+Main-Class: org.apache.batik.apps.svgbrowser.Main
Class-Path: lib/batik-ext.jar \
lib/batik-dom.jar \
lib/batik-css.jar \
@@ -9,9 +9,11 @@ Class-Path: lib/batik-ext.jar \
lib/batik-script.jar \
lib/batik-bridge.jar \
lib/batik-swing.jar \
+ lib/batik-anim.jar \
lib/batik-transcoder.jar \
lib/batik-gui-util.jar \
lib/batik-awt-util.jar \
+ lib/batik-codec.jar \
lib/batik-util.jar \
lib/batik-root.jar \
lib/batik-svggen.jar \
@@ -20,6 +22,8 @@ Class-Path: lib/batik-ext.jar \
batik-rasterizer.jar \
batik-pp.jar \
lib/xerces_2_5_0.jar \
+ lib/xalan-2.6.0.jar \
lib/xml-apis.jar \
+ lib/xml-apis-ext.jar \
lib/pdf-transcoder.jar \
lib/js.jar
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/make-squiggle-app.sh.template
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/make-squiggle-app.sh.template b/modules/thirdparty/batik/sources/make-squiggle-app.sh.template
new file mode 100644
index 0000000..46356a5
--- /dev/null
+++ b/modules/thirdparty/batik/sources/make-squiggle-app.sh.template
@@ -0,0 +1,87 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# make-squiggle-app.sh
+#
+# Creates a Mac OS X application bundle for Squiggle, then opens a Finder
+# window for the current directory so that the user can drag the icon
+# into their desired installation location (probably /Applications).
+#
+# $Id$
+# -----------------------------------------------------------------------------
+
+trap 'echo Error creating application bundle.; exit 1' ERR
+
+cd `dirname "$0"`/..
+
+APP=Squiggle.app
+CON=$APP/Contents
+MAC=$CON/MacOS
+RES=$CON/Resources
+
+[ -e $APP ] && echo $APP already exists: please move it out of the way before running this script. && exit 1
+
+echo Creating $APP in `pwd`...
+
+mkdir $APP $CON $MAC $RES
+
+cat >$CON/Info.plist <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleExecutable</key>
+ <string>Squiggle</string>
+ <key>CFBundleVersion</key>
+ <string>@VERSION@</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@VERSION@</string>
+ <key>CFBundleIconFile</key>
+ <string>Squiggle.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.apache.batik</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>Squiggle</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © @YEAR@ Apache Software Foundation. All Rights Reserved.</string>
+</dict>
+</plist>
+EOF
+
+cat >$MAC/Squiggle <<EOF
+#!/bin/sh
+
+JAVA=/usr/bin/java
+[ -e "$JAVA_HOME/bin/java" ] && JAVA="$JAVA_HOME/bin/java"
+
+"$JAVA" -Dcom.apple.mrj.application.apple.menu.about.name=Squiggle -jar "\`dirname \$0\`/../Resources/batik-squiggle.jar"
+EOF
+chmod a+x $MAC/Squiggle
+
+cp -r *.jar lib extensions $RES/
+mv $RES/lib/Squiggle.icns $RES/
+
+echo Done.
+
+open .
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/Makefile
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/Makefile b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/Makefile
new file mode 100644
index 0000000..f6ad40e
--- /dev/null
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/Makefile
@@ -0,0 +1,21 @@
+################################################################################
+##
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+##
+################################################################################
+
+default :
+ $(MAKE) -C ../../../..
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/Version.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/Version.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/Version.java
index 2864fe9..632d9b5 100644
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/Version.java
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/Version.java
@@ -1,10 +1,11 @@
/*
- Copyright 2003 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@@ -15,37 +16,88 @@
limitations under the License.
*/
-
package org.apache.flex.forks.batik;
/**
* This class defines the Batik version number.
*
* @author <a href="mailto:vincent.hardy@sun.com">Vincent Hardy</a>
- * @version $Id: Version.java,v 1.3 2004/09/24 10:56:36 deweese Exp $
+ * @version $Id: Version.java 568875 2007-08-23 08:12:11Z cam $
*/
public final class Version {
- public static final String LABEL_DEVELOPMENT_BUILD
- = "development.build";
-
+
/**
- * @return the Batik version. This is based on the CVS tag.
- * If this Version is not part of a tagged release, then
- * the returned value is a constant reflecting a development
- * build.
+ * Returns the Batik version.
+ * <p>
+ * This is based on the Implementation-Version attribute in the
+ * batik-util.jar (which is where this Version class lives) and
+ * the 'HeadURL' SVN keyword. The keyword be substituted with
+ * the URL of this file, which is then inspected to determine if this
+ * file was compiled from the trunk, a tag (a release version), or a
+ * branch. The format of the returned string will be one of the
+ * following:
+ * </p>
+ * <table>
+ * <tr>
+ * <th>Source</th>
+ * <th>Version string</th>
+ * </tr>
+ * <tr>
+ * <td>Release version</td>
+ * <td><em>version</em></td>
+ * </tr>
+ * <tr>
+ * <td>Trunk</td>
+ * <td><em>version</em>+r<em>revision</em></td>
+ * </tr>
+ * <tr>
+ * <td>Branch</td>
+ * <td><em>version</em>+r<em>revision</em>; <em>branch-name</em></td>
+ * </tr>
+ * <tr>
+ * <td>Unknown</td>
+ * <td>development version</td>
+ * </tr>
+ * </table>
+ * <p>
+ * Prior to release 1.7, the version string would
+ * be the straight tag (e.g. <code>"batik-1_6"</code>) or the
+ * string <code>"development.version"</code>. <em>revision</em> is the
+ * Subversion working copy's revision number.
+ * </p>
*/
public static String getVersion() {
- String tagName = "$Name: batik-1_6 $";
- if (tagName.startsWith("$Name:")) {
- tagName = tagName.substring(6, tagName.length()-1);
- } else {
- tagName = "";
+ Package pkg = Version.class.getPackage();
+ String version = null;
+ if (pkg != null) {
+ version = pkg.getImplementationVersion();
+ }
+ String headURL = "$HeadURL: https://svn.apache.org/repos/asf/xmlgraphics/batik/tags/batik-1_7/sources/org/apache/batik/Version.java $";
+ String prefix = "$HeadURL: ";
+ String suffix = "/sources/org/apache/batik/Version.java $";
+ if (headURL.startsWith(prefix) && headURL.endsWith(suffix)) {
+ headURL = headURL.substring
+ (prefix.length(), headURL.length() - suffix.length());
+ if (!headURL.endsWith("/trunk")) {
+ int index1 = headURL.lastIndexOf('/');
+ int index2 = headURL.lastIndexOf('/', index1 - 1);
+ String name = headURL.substring(index1 + 1);
+ String type = headURL.substring(index2 + 1, index1);
+ String tagPrefix = "batik-";
+ if (type.equals("tags") && name.startsWith(tagPrefix)) {
+ // Release, just use the tag name
+ version = name.substring(tagPrefix.length())
+ .replace('_', '.');
+ } else if (type.equals("branches")) {
+ // SVN branch
+ version += "; " + name;
+ }
+ }
}
-
- if(tagName.trim().intern().equals("")){
- tagName = LABEL_DEVELOPMENT_BUILD;
+ if (version == null) {
+ version = "development version";
}
- return tagName;
+ return version;
}
}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AbstractAnimation.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AbstractAnimation.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AbstractAnimation.java
new file mode 100644
index 0000000..0a9d9ff
--- /dev/null
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AbstractAnimation.java
@@ -0,0 +1,210 @@
+/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+package org.apache.flex.forks.batik.anim;
+
+import org.apache.flex.forks.batik.anim.timing.TimedElement;
+import org.apache.flex.forks.batik.anim.values.AnimatableValue;
+import org.apache.flex.forks.batik.dom.anim.AnimatableElement;
+
+// import org.apache.flex.forks.batik.anim.timing.Trace;
+
+/**
+ * An abstract base class for the different types of animation.
+ *
+ * @author <a href="mailto:cam%40mcc%2eid%2eau">Cameron McCormack</a>
+ * @version $Id: AbstractAnimation.java 478283 2006-11-22 18:53:40Z dvholten $
+ */
+public abstract class AbstractAnimation {
+
+ // Constants for calcMode.
+ public static final short CALC_MODE_DISCRETE = 0;
+ public static final short CALC_MODE_LINEAR = 1;
+ public static final short CALC_MODE_PACED = 2;
+ public static final short CALC_MODE_SPLINE = 3;
+
+ /**
+ * The TimedElement that controls the timing of this animation.
+ */
+ protected TimedElement timedElement;
+
+ /**
+ * The AnimatableElement that gives access to underlying values in the
+ * document.
+ */
+ protected AnimatableElement animatableElement;
+
+ /**
+ * The animation that is lower in the sandwich.
+ */
+ protected AbstractAnimation lowerAnimation;
+
+ /**
+ * The animation that is higher in the sandwich.
+ */
+ protected AbstractAnimation higherAnimation;
+
+ /**
+ * Whether this animation needs recomputing.
+ */
+ protected boolean isDirty;
+
+ /**
+ * Whether this animation is active.
+ */
+ protected boolean isActive;
+
+ /**
+ * Whether this animation is frozen.
+ */
+ protected boolean isFrozen;
+
+ /**
+ * The time at which this animation became active. Used for ensuring the
+ * sandwich order is correct when multiple animations become active
+ * simultaneously.
+ */
+ protected float beginTime;
+
+ /**
+ * The value of this animation.
+ */
+ protected AnimatableValue value;
+
+ /**
+ * The value of this animation composed with any others.
+ */
+ protected AnimatableValue composedValue;
+
+ /**
+ * Whether this animation depends on the underlying value.
+ */
+ protected boolean usesUnderlyingValue;
+
+ /**
+ * Whether this animation is a 'to-animation'.
+ */
+ protected boolean toAnimation;
+
+ /**
+ * Creates a new Animation.
+ */
+ protected AbstractAnimation(TimedElement timedElement,
+ AnimatableElement animatableElement) {
+ this.timedElement = timedElement;
+ this.animatableElement = animatableElement;
+ }
+
+ /**
+ * Returns the TimedElement for this animation.
+ */
+ public TimedElement getTimedElement() {
+ return timedElement;
+ }
+
+ /**
+ * Returns the value of this animation, or null if it isn't active.
+ */
+ public AnimatableValue getValue() {
+ if (!isActive && !isFrozen) {
+ return null;
+ }
+ return value;
+ }
+
+ /**
+ * Returns the composed value of this animation, or null if it isn't active.
+ */
+ public AnimatableValue getComposedValue() {
+ // Trace.enter(this, "getComposedValue", null); try {
+ // Trace.print("isActive == " + isActive + ", isFrozen == " + isFrozen + ", isDirty == " + isDirty);
+ if (!isActive && !isFrozen) {
+ return null;
+ }
+ if (isDirty) {
+ // Trace.print("willReplace() == " + willReplace());
+ // Trace.print("value == " + value);
+ AnimatableValue lowerValue = null;
+ if (!willReplace()) {
+ // Trace.print("lowerAnimation == " + lowerAnimation);
+ if (lowerAnimation == null) {
+ lowerValue = animatableElement.getUnderlyingValue();
+ usesUnderlyingValue = true;
+ } else {
+ lowerValue = lowerAnimation.getComposedValue();
+ usesUnderlyingValue = false;
+ }
+ // Trace.print("lowerValue == " + lowerValue);
+ }
+ composedValue =
+ value.interpolate(composedValue, null, 0f, lowerValue, 1);
+ // Trace.print("composedValue == " + composedValue);
+ isDirty = false;
+ }
+ return composedValue;
+ // } finally { Trace.exit(); }
+ }
+
+ /**
+ * Returns a string representation of this animation.
+ */
+ public String toString() {
+ return timedElement.toString();
+ }
+
+ /**
+ * Returns whether this animation depends on the underlying value.
+ */
+ public boolean usesUnderlyingValue() {
+ return usesUnderlyingValue || toAnimation;
+ }
+
+ /**
+ * Returns whether this animation will replace values on animations
+ * lower in the sandwich.
+ */
+ protected boolean willReplace() {
+ return true;
+ }
+
+ /**
+ * Marks this animation and any animation that depends on it
+ * as dirty.
+ */
+ protected void markDirty() {
+ isDirty = true;
+ if (higherAnimation != null
+ && !higherAnimation.willReplace()
+ && !higherAnimation.isDirty) {
+ higherAnimation.markDirty();
+ }
+ }
+
+ /**
+ * Called when the element is sampled for its "last" value.
+ */
+ protected void sampledLastValue(int repeatIteration) {
+ }
+
+ /**
+ * Called when the element is sampled at the given time. This updates
+ * the {@link #value} of the animation if active.
+ */
+ protected abstract void sampledAt(float simpleTime, float simpleDur,
+ int repeatIteration);
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AnimationEngine.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AnimationEngine.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AnimationEngine.java
new file mode 100644
index 0000000..78e0834
--- /dev/null
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AnimationEngine.java
@@ -0,0 +1,698 @@
+/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+package org.apache.flex.forks.batik.anim;
+
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.flex.forks.batik.anim.timing.TimedDocumentRoot;
+import org.apache.flex.forks.batik.anim.timing.TimedElement;
+import org.apache.flex.forks.batik.anim.timing.TimegraphListener;
+import org.apache.flex.forks.batik.anim.values.AnimatableValue;
+import org.apache.flex.forks.batik.dom.anim.AnimationTarget;
+import org.apache.flex.forks.batik.dom.anim.AnimationTargetListener;
+import org.apache.flex.forks.batik.util.DoublyIndexedTable;
+
+import org.w3c.dom.Document;
+
+/**
+ * An abstract base class for managing animation in a document.
+ *
+ * @author <a href="mailto:cam%40mcc%2eid%2eau">Cameron McCormack</a>
+ * @version $Id: AnimationEngine.java 592621 2007-11-07 05:58:12Z cam $
+ */
+public abstract class AnimationEngine {
+
+ // Constants to identify the type of animation.
+ public static final short ANIM_TYPE_XML = 0;
+ public static final short ANIM_TYPE_CSS = 1;
+ public static final short ANIM_TYPE_OTHER = 2;
+
+ /**
+ * The document this AnimationEngine is managing animation for.
+ */
+ protected Document document;
+
+ /**
+ * The root time container for the document.
+ */
+ protected TimedDocumentRoot timedDocumentRoot;
+
+ /**
+ * The time at which the document was paused, or 0 if the document is not
+ * paused.
+ */
+ protected long pauseTime;
+
+ /**
+ * Map of AnimationTargets to TargetInfo objects.
+ */
+ protected HashMap targets = new HashMap();
+
+ /**
+ * Map of AbstractAnimations to AnimationInfo objects.
+ */
+ protected HashMap animations = new HashMap();
+
+ /**
+ * The listener object for animation target base value changes.
+ */
+ protected Listener targetListener = new Listener();
+
+ /**
+ * Creates a new AnimationEngine for the given document.
+ */
+ public AnimationEngine(Document doc) {
+ this.document = doc;
+ timedDocumentRoot = createDocumentRoot();
+ }
+
+ /**
+ * Disposes this animation engine.
+ */
+ public void dispose() {
+ // Remove any target listeners that are registered.
+ Iterator i = targets.entrySet().iterator();
+ while (i.hasNext()) {
+ Map.Entry e = (Map.Entry) i.next();
+ AnimationTarget target = (AnimationTarget) e.getKey();
+ TargetInfo info = (TargetInfo) e.getValue();
+
+ Iterator j = info.xmlAnimations.iterator();
+ while (j.hasNext()) {
+ DoublyIndexedTable.Entry e2 =
+ (DoublyIndexedTable.Entry) j.next();
+ String namespaceURI = (String) e2.getKey1();
+ String localName = (String) e2.getKey2();
+ Sandwich sandwich = (Sandwich) e2.getValue();
+ if (sandwich.listenerRegistered) {
+ target.removeTargetListener(namespaceURI, localName, false,
+ targetListener);
+ }
+ }
+
+ j = info.cssAnimations.entrySet().iterator();
+ while (j.hasNext()) {
+ Map.Entry e2 = (Map.Entry) j.next();
+ String propertyName = (String) e2.getKey();
+ Sandwich sandwich = (Sandwich) e2.getValue();
+ if (sandwich.listenerRegistered) {
+ target.removeTargetListener(null, propertyName, true,
+ targetListener);
+ }
+ }
+ }
+ }
+
+ /**
+ * Pauses the animations.
+ */
+ public void pause() {
+ if (pauseTime == 0) {
+ pauseTime = System.currentTimeMillis();
+ }
+ }
+
+ /**
+ * Unpauses the animations.
+ */
+ public void unpause() {
+ if (pauseTime != 0) {
+ Calendar begin = timedDocumentRoot.getDocumentBeginTime();
+ int dt = (int) (System.currentTimeMillis() - pauseTime);
+ begin.add(Calendar.MILLISECOND, dt);
+ pauseTime = 0;
+ }
+ }
+
+ /**
+ * Returns whether animations are currently paused.
+ */
+ public boolean isPaused() {
+ return pauseTime != 0;
+ }
+
+ /**
+ * Returns the current document time.
+ */
+ public float getCurrentTime() {
+ return timedDocumentRoot.getCurrentTime();
+ }
+
+ /**
+ * Sets the current document time.
+ */
+ public float setCurrentTime(float t) {
+ boolean p = pauseTime != 0;
+ unpause();
+ Calendar begin = timedDocumentRoot.getDocumentBeginTime();
+ float now =
+ timedDocumentRoot.convertEpochTime(System.currentTimeMillis());
+ begin.add(Calendar.MILLISECOND, (int) ((now - t) * 1000));
+ if (p) {
+ pause();
+ }
+ return tick(t, true);
+ }
+
+ /**
+ * Adds an animation to the document.
+ * @param target the target element of the animation
+ * @param type the type of animation (must be one of the
+ * <code>ANIM_TYPE_*</code> constants defined in this class
+ * @param ns the namespace URI of the attribute being animated, if
+ * <code>type == </code>{@link #ANIM_TYPE_XML}
+ * @param an the attribute name if <code>type == </code>{@link
+ * #ANIM_TYPE_XML}, the property name if <code>type == </code>
+ * {@link #ANIM_TYPE_CSS}, and the animation type otherwise
+ * @param anim the animation
+ */
+ public void addAnimation(AnimationTarget target, short type, String ns,
+ String an, AbstractAnimation anim) {
+ // org.apache.flex.forks.batik.anim.timing.Trace.enter(this, "addAnimation", new Object[] { target, new Short[type], ns, an, anim } ); try {
+ timedDocumentRoot.addChild(anim.getTimedElement());
+
+ AnimationInfo animInfo = getAnimationInfo(anim);
+ animInfo.type = type;
+ animInfo.attributeNamespaceURI = ns;
+ animInfo.attributeLocalName = an;
+ animInfo.target = target;
+ animations.put(anim, animInfo);
+
+ Sandwich sandwich = getSandwich(target, type, ns, an);
+ if (sandwich.animation == null) {
+ anim.lowerAnimation = null;
+ anim.higherAnimation = null;
+ } else {
+ sandwich.animation.higherAnimation = anim;
+ anim.lowerAnimation = sandwich.animation;
+ anim.higherAnimation = null;
+ }
+ sandwich.animation = anim;
+ if (anim.lowerAnimation == null) {
+ sandwich.lowestAnimation = anim;
+ }
+ // } finally { org.apache.flex.forks.batik.anim.timing.Trace.exit(); }
+ }
+
+ /**
+ * Removes an animation from the document.
+ */
+ public void removeAnimation(AbstractAnimation anim) {
+ // org.apache.flex.forks.batik.anim.timing.Trace.enter(this, "removeAnimation", new Object[] { anim } ); try {
+ timedDocumentRoot.removeChild(anim.getTimedElement());
+ AbstractAnimation nextHigher = anim.higherAnimation;
+ if (nextHigher != null) {
+ nextHigher.markDirty();
+ }
+ moveToBottom(anim);
+ if (anim.higherAnimation != null) {
+ anim.higherAnimation.lowerAnimation = null;
+ }
+ AnimationInfo animInfo = getAnimationInfo(anim);
+ Sandwich sandwich = getSandwich(animInfo.target, animInfo.type,
+ animInfo.attributeNamespaceURI,
+ animInfo.attributeLocalName);
+ if (sandwich.animation == anim) {
+ sandwich.animation = null;
+ sandwich.lowestAnimation = null;
+ sandwich.shouldUpdate = true;
+ }
+ // } finally { org.apache.flex.forks.batik.anim.timing.Trace.exit(); }
+ }
+
+ /**
+ * Returns the Sandwich for the given animation type/attribute.
+ */
+ protected Sandwich getSandwich(AnimationTarget target, short type,
+ String ns, String an) {
+ TargetInfo info = getTargetInfo(target);
+ Sandwich sandwich;
+ if (type == ANIM_TYPE_XML) {
+ sandwich = (Sandwich) info.xmlAnimations.get(ns, an);
+ if (sandwich == null) {
+ sandwich = new Sandwich();
+ info.xmlAnimations.put(ns, an, sandwich);
+ }
+ } else if (type == ANIM_TYPE_CSS) {
+ sandwich = (Sandwich) info.cssAnimations.get(an);
+ if (sandwich == null) {
+ sandwich = new Sandwich();
+ info.cssAnimations.put(an, sandwich);
+ }
+ } else {
+ sandwich = (Sandwich) info.otherAnimations.get(an);
+ if (sandwich == null) {
+ sandwich = new Sandwich();
+ info.otherAnimations.put(an, sandwich);
+ }
+ }
+ return sandwich;
+ }
+
+ /**
+ * Returns the TargetInfo for the given AnimationTarget.
+ */
+ protected TargetInfo getTargetInfo(AnimationTarget target) {
+ TargetInfo info = (TargetInfo) targets.get(target);
+ if (info == null) {
+ info = new TargetInfo();
+ targets.put(target, info);
+ }
+ return info;
+ }
+
+ /**
+ * Returns the AnimationInfo for the given AbstractAnimation.
+ */
+ protected AnimationInfo getAnimationInfo(AbstractAnimation anim) {
+ AnimationInfo info = (AnimationInfo) animations.get(anim);
+ if (info == null) {
+ info = new AnimationInfo();
+ animations.put(anim, info);
+ }
+ return info;
+ }
+
+ protected static final Map.Entry[] MAP_ENTRY_ARRAY = new Map.Entry[0];
+
+ /**
+ * Updates the animations in the document to the given document time.
+ * @param time the document time to sample at
+ * @param hyperlinking whether the document should be seeked to the given
+ * time, as with hyperlinking
+ */
+ protected float tick(float time, boolean hyperlinking) {
+ float waitTime = timedDocumentRoot.seekTo(time, hyperlinking);
+ Map.Entry[] targetEntries =
+ (Map.Entry[]) targets.entrySet().toArray(MAP_ENTRY_ARRAY);
+ for (int i = 0; i < targetEntries.length; i++) {
+ Map.Entry e = targetEntries[i];
+ AnimationTarget target = (AnimationTarget) e.getKey();
+ TargetInfo info = (TargetInfo) e.getValue();
+
+ // Update the XML animations.
+ Iterator j = info.xmlAnimations.iterator();
+ while (j.hasNext()) {
+ DoublyIndexedTable.Entry e2 =
+ (DoublyIndexedTable.Entry) j.next();
+ String namespaceURI = (String) e2.getKey1();
+ String localName = (String) e2.getKey2();
+ Sandwich sandwich = (Sandwich) e2.getValue();
+ if (sandwich.shouldUpdate ||
+ sandwich.animation != null
+ && sandwich.animation.isDirty) {
+ AnimatableValue av = null;
+ boolean usesUnderlying = false;
+ AbstractAnimation anim = sandwich.animation;
+ if (anim != null) {
+ av = anim.getComposedValue();
+ usesUnderlying =
+ sandwich.lowestAnimation.usesUnderlyingValue();
+ anim.isDirty = false;
+ }
+ if (usesUnderlying && !sandwich.listenerRegistered) {
+ target.addTargetListener(namespaceURI, localName, false,
+ targetListener);
+ sandwich.listenerRegistered = true;
+ } else if (!usesUnderlying && sandwich.listenerRegistered) {
+ target.removeTargetListener(namespaceURI, localName,
+ false, targetListener);
+ sandwich.listenerRegistered = false;
+ }
+ target.updateAttributeValue(namespaceURI, localName, av);
+ sandwich.shouldUpdate = false;
+ }
+ }
+
+ // Update the CSS animations.
+ j = info.cssAnimations.entrySet().iterator();
+ while (j.hasNext()) {
+ Map.Entry e2 = (Map.Entry) j.next();
+ String propertyName = (String) e2.getKey();
+ Sandwich sandwich = (Sandwich) e2.getValue();
+ if (sandwich.shouldUpdate ||
+ sandwich.animation != null
+ && sandwich.animation.isDirty) {
+ AnimatableValue av = null;
+ boolean usesUnderlying = false;
+ AbstractAnimation anim = sandwich.animation;
+ if (anim != null) {
+ av = anim.getComposedValue();
+ usesUnderlying =
+ sandwich.lowestAnimation.usesUnderlyingValue();
+ anim.isDirty = false;
+ }
+ if (usesUnderlying && !sandwich.listenerRegistered) {
+ target.addTargetListener(null, propertyName, true,
+ targetListener);
+ sandwich.listenerRegistered = true;
+ } else if (!usesUnderlying && sandwich.listenerRegistered) {
+ target.removeTargetListener(null, propertyName, true,
+ targetListener);
+ sandwich.listenerRegistered = false;
+ }
+ if (usesUnderlying) {
+ target.updatePropertyValue(propertyName, null);
+ }
+ if (!(usesUnderlying && av == null)) {
+ target.updatePropertyValue(propertyName, av);
+ }
+ sandwich.shouldUpdate = false;
+ }
+ }
+
+ // Update the other animations.
+ j = info.otherAnimations.entrySet().iterator();
+ while (j.hasNext()) {
+ Map.Entry e2 = (Map.Entry) j.next();
+ String type = (String) e2.getKey();
+ Sandwich sandwich = (Sandwich) e2.getValue();
+ if (sandwich.shouldUpdate || sandwich.animation.isDirty) {
+ AnimatableValue av = null;
+ AbstractAnimation anim = sandwich.animation;
+ if (anim != null) {
+ av = sandwich.animation.getComposedValue();
+ anim.isDirty = false;
+ }
+ target.updateOtherValue(type, av);
+ sandwich.shouldUpdate = false;
+ }
+ }
+ }
+ return waitTime;
+ }
+
+ /**
+ * Invoked to indicate an animation became active at the specified time.
+ *
+ * @param anim the animation
+ * @param begin the time the element became active, in document simple time
+ */
+ public void toActive(AbstractAnimation anim, float begin) {
+ moveToTop(anim);
+ anim.isActive = true;
+ anim.beginTime = begin;
+ anim.isFrozen = false;
+ // Move the animation down, in case it began at the same time as another
+ // animation in the sandwich and it's earlier in document order.
+ pushDown(anim);
+ anim.markDirty();
+ }
+
+ /**
+ * Moves the animation down the sandwich such that it is in the right
+ * position according to begin time and document order.
+ */
+ protected void pushDown(AbstractAnimation anim) {
+ TimedElement e = anim.getTimedElement();
+ AbstractAnimation top = null;
+ boolean moved = false;
+ while (anim.lowerAnimation != null
+ && (anim.lowerAnimation.isActive
+ || anim.lowerAnimation.isFrozen)
+ && (anim.lowerAnimation.beginTime > anim.beginTime
+ || anim.lowerAnimation.beginTime == anim.beginTime
+ && e.isBefore(anim.lowerAnimation.getTimedElement()))) {
+ AbstractAnimation higher = anim.higherAnimation;
+ AbstractAnimation lower = anim.lowerAnimation;
+ AbstractAnimation lowerLower = lower.lowerAnimation;
+ if (higher != null) {
+ higher.lowerAnimation = lower;
+ }
+ if (lowerLower != null) {
+ lowerLower.higherAnimation = anim;
+ }
+ lower.lowerAnimation = anim;
+ lower.higherAnimation = higher;
+ anim.lowerAnimation = lowerLower;
+ anim.higherAnimation = lower;
+ if (!moved) {
+ top = lower;
+ moved = true;
+ }
+ }
+ if (moved) {
+ AnimationInfo animInfo = getAnimationInfo(anim);
+ Sandwich sandwich = getSandwich(animInfo.target, animInfo.type,
+ animInfo.attributeNamespaceURI,
+ animInfo.attributeLocalName);
+ if (sandwich.animation == anim) {
+ sandwich.animation = top;
+ }
+ if (anim.lowerAnimation == null) {
+ sandwich.lowestAnimation = anim;
+ }
+ }
+ }
+
+ /**
+ * Invoked to indicate that this timed element became inactive.
+ *
+ * @param anim the animation
+ * @param isFrozen whether the element is frozen or not
+ */
+ public void toInactive(AbstractAnimation anim, boolean isFrozen) {
+ anim.isActive = false;
+ anim.isFrozen = isFrozen;
+ anim.beginTime = Float.NEGATIVE_INFINITY;
+ anim.markDirty();
+ if (!isFrozen) {
+ anim.value = null;
+ moveToBottom(anim);
+ } else {
+ pushDown(anim);
+ }
+ }
+
+ /**
+ * Invoked to indicate that this timed element has had its fill removed.
+ */
+ public void removeFill(AbstractAnimation anim) {
+ anim.isActive = false;
+ anim.isFrozen = false;
+ anim.value = null;
+ anim.markDirty();
+ moveToBottom(anim);
+ }
+
+ /**
+ * Moves the given animation to the top of the sandwich.
+ */
+ protected void moveToTop(AbstractAnimation anim) {
+ AnimationInfo animInfo = getAnimationInfo(anim);
+ Sandwich sandwich = getSandwich(animInfo.target, animInfo.type,
+ animInfo.attributeNamespaceURI,
+ animInfo.attributeLocalName);
+ sandwich.shouldUpdate = true;
+ if (anim.higherAnimation == null) {
+ return;
+ }
+ if (anim.lowerAnimation == null) {
+ sandwich.lowestAnimation = anim.higherAnimation;
+ } else {
+ anim.lowerAnimation.higherAnimation = anim.higherAnimation;
+ }
+ anim.higherAnimation.lowerAnimation = anim.lowerAnimation;
+ if (sandwich.animation != null) {
+ sandwich.animation.higherAnimation = anim;
+ }
+ anim.lowerAnimation = sandwich.animation;
+ anim.higherAnimation = null;
+ sandwich.animation = anim;
+ }
+
+ /**
+ * Moves the given animation to the bottom of the sandwich.
+ */
+ protected void moveToBottom(AbstractAnimation anim) {
+ if (anim.lowerAnimation == null) {
+ return;
+ }
+ AnimationInfo animInfo = getAnimationInfo(anim);
+ Sandwich sandwich = getSandwich(animInfo.target, animInfo.type,
+ animInfo.attributeNamespaceURI,
+ animInfo.attributeLocalName);
+ AbstractAnimation nextLower = anim.lowerAnimation;
+ nextLower.markDirty();
+ anim.lowerAnimation.higherAnimation = anim.higherAnimation;
+ if (anim.higherAnimation != null) {
+ anim.higherAnimation.lowerAnimation = anim.lowerAnimation;
+ } else {
+ sandwich.animation = nextLower;
+ sandwich.shouldUpdate = true;
+ }
+ sandwich.lowestAnimation.lowerAnimation = anim;
+ anim.higherAnimation = sandwich.lowestAnimation;
+ anim.lowerAnimation = null;
+ sandwich.lowestAnimation = anim;
+ if (sandwich.animation.isDirty) {
+ sandwich.shouldUpdate = true;
+ }
+ }
+
+ /**
+ * Adds a {@link TimegraphListener} to the document.
+ */
+ public void addTimegraphListener(TimegraphListener l) {
+ timedDocumentRoot.addTimegraphListener(l);
+ }
+
+ /**
+ * Removes a {@link TimegraphListener} from the document.
+ */
+ public void removeTimegraphListener(TimegraphListener l) {
+ timedDocumentRoot.removeTimegraphListener(l);
+ }
+
+ /**
+ * Invoked to indicate that this timed element has been sampled at the given
+ * time.
+ *
+ * @param anim the animation
+ * @param simpleTime the sample time in local simple time
+ * @param simpleDur the simple duration of the element
+ * @param repeatIteration the repeat iteration during which the element was
+ * sampled
+ */
+ public void sampledAt(AbstractAnimation anim, float simpleTime,
+ float simpleDur, int repeatIteration) {
+ anim.sampledAt(simpleTime, simpleDur, repeatIteration);
+ }
+
+ /**
+ * Invoked to indicate that this timed element has been sampled at the end
+ * of its active time, at an integer multiple of the simple duration. This
+ * is the "last" value that will be used for filling, which cannot be
+ * sampled normally.
+ */
+ public void sampledLastValue(AbstractAnimation anim, int repeatIteration) {
+ anim.sampledLastValue(repeatIteration);
+ }
+
+ /**
+ * Creates a new returns a new TimedDocumentRoot object for the document.
+ */
+ protected abstract TimedDocumentRoot createDocumentRoot();
+
+ /**
+ * Listener class for changes to base values on a target element.
+ */
+ protected class Listener implements AnimationTargetListener {
+
+ /**
+ * Invoked to indicate that base value of the specified attribute
+ * or property has changed.
+ */
+ public void baseValueChanged(AnimationTarget t, String ns, String ln,
+ boolean isCSS) {
+ short type = isCSS ? ANIM_TYPE_CSS : ANIM_TYPE_XML;
+ Sandwich sandwich = getSandwich(t, type, ns, ln);
+ sandwich.shouldUpdate = true;
+ AbstractAnimation anim = sandwich.animation;
+ while (anim.lowerAnimation != null) {
+ anim = anim.lowerAnimation;
+ }
+ anim.markDirty();
+ }
+ }
+
+ /**
+ * Class to hold XML and CSS animations for a target element.
+ */
+ protected static class TargetInfo {
+
+ /**
+ * Map of XML attribute names to the corresponding {@link Sandwich}
+ * objects.
+ */
+ public DoublyIndexedTable xmlAnimations = new DoublyIndexedTable();
+
+ /**
+ * Map of CSS attribute names to the corresponding {@link Sandwich}
+ * objects.
+ */
+ public HashMap cssAnimations = new HashMap();
+
+ /**
+ * Map of other animation types to the corresponding {@link Sandwich}
+ * objects.
+ */
+ public HashMap otherAnimations = new HashMap();
+ }
+
+ /**
+ * Class to hold an animation sandwich for a particular attribute.
+ */
+ protected static class Sandwich {
+
+ /**
+ * The top-most animation in the sandwich.
+ */
+ public AbstractAnimation animation;
+
+ /**
+ * The bottom-most animation in the sandwich.
+ */
+ public AbstractAnimation lowestAnimation;
+
+ /**
+ * Whether the animation needs to have its value copied into the
+ * document.
+ */
+ public boolean shouldUpdate;
+
+ /**
+ * Whether an {@link AnimationTargetListener} has been registered to
+ * listen for changes to the base value.
+ */
+ public boolean listenerRegistered;
+ }
+
+ /**
+ * Class to hold target information of an animation.
+ */
+ protected static class AnimationInfo {
+
+ /**
+ * The target of the animation.
+ */
+ public AnimationTarget target;
+
+ /**
+ * The type of animation. Must be one of the <code>ANIM_TYPE_*</code>
+ * constants defined in {@link AnimationEngine}.
+ */
+ public short type;
+
+ /**
+ * The namespace URI of the attribute to animate, if this is an XML
+ * attribute animation.
+ */
+ public String attributeNamespaceURI;
+
+ /**
+ * The local name of the attribute or the name of the CSS property to
+ * animate.
+ */
+ public String attributeLocalName;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AnimationException.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AnimationException.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AnimationException.java
new file mode 100644
index 0000000..9c8150e
--- /dev/null
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/AnimationException.java
@@ -0,0 +1,90 @@
+/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+package org.apache.flex.forks.batik.anim;
+
+import org.apache.flex.forks.batik.anim.timing.TimedElement;
+
+/**
+ * An exception class for SMIL animation exceptions.
+ *
+ * @author <a href="mailto:cam%40mcc%2eid%2eau">Cameron McCormack</a>
+ * @version $Id: AnimationException.java 475954 2006-11-16 22:34:04Z cam $
+ */
+public class AnimationException extends RuntimeException {
+
+ /**
+ * The timed element on which the error occurred.
+ */
+ protected TimedElement e;
+
+ /**
+ * The error code.
+ */
+ protected String code;
+
+ /**
+ * The parameters to use for the error message.
+ */
+ protected Object[] params;
+
+ /**
+ * The message.
+ */
+ protected String message;
+
+ /**
+ * Creates a new AnimationException.
+ * @param e the animation element on which the error occurred
+ * @param code the error code
+ * @param params the parameters to use for the error message
+ */
+ public AnimationException(TimedElement e, String code, Object[] params) {
+ this.e = e;
+ this.code = code;
+ this.params = params;
+ }
+
+ /**
+ * Returns the timed element that caused this animation exception.
+ */
+ public TimedElement getElement() {
+ return e;
+ }
+
+ /**
+ * Returns the error code.
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Returns the error message parameters.
+ */
+ public Object[] getParams() {
+ return params;
+ }
+
+ /**
+ * Returns the error message according to the error code and parameters.
+ */
+ public String getMessage() {
+ return TimedElement.formatMessage(code, params);
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/ColorAnimation.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/ColorAnimation.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/ColorAnimation.java
new file mode 100644
index 0000000..bcbc537
--- /dev/null
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/ColorAnimation.java
@@ -0,0 +1,50 @@
+/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+package org.apache.flex.forks.batik.anim;
+
+import org.apache.flex.forks.batik.anim.timing.TimedElement;
+import org.apache.flex.forks.batik.anim.values.AnimatableValue;
+import org.apache.flex.forks.batik.dom.anim.AnimatableElement;
+
+/**
+ * An animation class for 'animateColor' animations.
+ *
+ * @author <a href="mailto:cam%40mcc%2eid%2eau">Cameron McCormack</a>
+ * @version $Id: ColorAnimation.java 475477 2006-11-15 22:44:28Z cam $
+ */
+public class ColorAnimation extends SimpleAnimation {
+
+ /**
+ * Creates a new ColorAnimation.
+ */
+ public ColorAnimation(TimedElement timedElement,
+ AnimatableElement animatableElement,
+ int calcMode,
+ float[] keyTimes,
+ float[] keySplines,
+ boolean additive,
+ boolean cumulative,
+ AnimatableValue[] values,
+ AnimatableValue from,
+ AnimatableValue to,
+ AnimatableValue by) {
+ super(timedElement, animatableElement, calcMode, keyTimes, keySplines,
+ additive, cumulative, values, from, to, by);
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/InterpolatingAnimation.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/InterpolatingAnimation.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/InterpolatingAnimation.java
new file mode 100644
index 0000000..a0c3e82
--- /dev/null
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/anim/InterpolatingAnimation.java
@@ -0,0 +1,167 @@
+/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+package org.apache.flex.forks.batik.anim;
+
+import org.apache.flex.forks.batik.anim.timing.TimedElement;
+import org.apache.flex.forks.batik.dom.anim.AnimatableElement;
+import org.apache.flex.forks.batik.ext.awt.geom.Cubic;
+import org.apache.flex.forks.batik.util.SMILConstants;
+
+/**
+ * An abstract animation class for those animations that interpolate
+ * values. Specifically, this is for animations that have the 'calcMode',
+ * 'keyTimes', 'keySplines', 'additive' and 'cumulative' attributes.
+ *
+ * @author <a href="mailto:cam%40mcc%2eid%2eau">Cameron McCormack</a>
+ * @version $Id: InterpolatingAnimation.java 475477 2006-11-15 22:44:28Z cam $
+ */
+public abstract class InterpolatingAnimation extends AbstractAnimation {
+
+ /**
+ * The interpolation mode of this animator. This should take one
+ * of the CALC_MODE_* constants defined in {@link AbstractAnimation}.
+ */
+ protected int calcMode;
+
+ /**
+ * Time values to control the pacing of the animation.
+ */
+ protected float[] keyTimes;
+
+ /**
+ * Bezier control points that control the pacing of the animation.
+ */
+ protected float[] keySplines;
+
+ /**
+ * Cubics built from the bezier control points in {@link #keySplines}.
+ */
+ protected Cubic[] keySplineCubics;
+
+ /**
+ * Whether this animation adds to ones below it in the animation sandwich
+ * or replaces them.
+ */
+ protected boolean additive;
+
+ /**
+ * Whether this animation accumulates from previous iterations.
+ */
+ protected boolean cumulative;
+
+ /**
+ * Creates a new InterpolatingAnimation.
+ */
+ public InterpolatingAnimation(TimedElement timedElement,
+ AnimatableElement animatableElement,
+ int calcMode,
+ float[] keyTimes,
+ float[] keySplines,
+ boolean additive,
+ boolean cumulative) {
+ super(timedElement, animatableElement);
+ this.calcMode = calcMode;
+ this.keyTimes = keyTimes;
+ this.keySplines = keySplines;
+ this.additive = additive;
+ this.cumulative = cumulative;
+
+ if (calcMode == CALC_MODE_SPLINE) {
+ if (keySplines == null || keySplines.length % 4 != 0) {
+ throw timedElement.createException
+ ("attribute.malformed",
+ new Object[] { null,
+ SMILConstants.SMIL_KEY_SPLINES_ATTRIBUTE });
+ }
+ keySplineCubics = new Cubic[keySplines.length / 4];
+ for (int i = 0; i < keySplines.length / 4; i++) {
+ keySplineCubics[i] = new Cubic(0, 0,
+ keySplines[i * 4],
+ keySplines[i * 4 + 1],
+ keySplines[i * 4 + 2],
+ keySplines[i * 4 + 3],
+ 1, 1);
+ }
+ }
+
+ if (keyTimes != null) {
+ boolean invalidKeyTimes = false;
+ if ((calcMode == CALC_MODE_LINEAR || calcMode == CALC_MODE_SPLINE
+ || calcMode == CALC_MODE_PACED)
+ && (keyTimes.length < 2
+ || keyTimes[0] != 0
+ || keyTimes[keyTimes.length - 1] != 1)
+ || calcMode == CALC_MODE_DISCRETE
+ && (keyTimes.length == 0 || keyTimes[0] != 0)) {
+ invalidKeyTimes = true;
+ }
+ if (!invalidKeyTimes) {
+ for (int i = 1; i < keyTimes.length; i++) {
+ if (keyTimes[i] < 0 || keyTimes[1] > 1
+ || keyTimes[i] < keyTimes[i - 1]) {
+ invalidKeyTimes = true;
+ break;
+ }
+ }
+ }
+ if (invalidKeyTimes) {
+ throw timedElement.createException
+ ("attribute.malformed",
+ new Object[] { null,
+ SMILConstants.SMIL_KEY_TIMES_ATTRIBUTE });
+ }
+ }
+ }
+
+ /**
+ * Returns whether this animation will replace values on animations
+ * lower in the sandwich.
+ */
+ protected boolean willReplace() {
+ return !additive;
+ }
+
+ /**
+ * Called when the element is sampled for its "last" value.
+ */
+ protected void sampledLastValue(int repeatIteration) {
+ sampledAtUnitTime(1f, repeatIteration);
+ }
+
+ /**
+ * Called when the element is sampled at the given time.
+ */
+ protected void sampledAt(float simpleTime, float simpleDur,
+ int repeatIteration) {
+ float unitTime;
+ if (simpleDur == TimedElement.INDEFINITE) {
+ unitTime = 0;
+ } else {
+ unitTime = simpleTime / simpleDur;
+ }
+ sampledAtUnitTime(unitTime, repeatIteration);
+ }
+
+ /**
+ * Called when the element is sampled at the given unit time. This updates
+ * the {@link #value} of the animation if active.
+ */
+ protected abstract void sampledAtUnitTime(float unitTime,
+ int repeatIteration);
+}