diff options
author | kitfox | 2008-12-08 10:22:06 +0100 |
---|---|---|
committer | kitfox | 2008-12-08 10:22:06 +0100 |
commit | 7427a061b301fad622a7c9c6514c622a812c6279 (patch) | |
tree | f09c365dad467edf6ea95987db2818f3bb79cb29 | |
parent | Added fix for calculating screen units while running on a headless server (diff) | |
download | svg-salamander-core-7427a061b301fad622a7c9c6514c622a812c6279.tar.gz svg-salamander-core-7427a061b301fad622a7c9c6514c622a812c6279.tar.xz svg-salamander-core-7427a061b301fad622a7c9c6514c622a812c6279.zip |
Removing a lot of junk from svgSalamander.jar
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@58 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
-rwxr-xr-x | build.xml | 8 | ||||
-rwxr-xr-x | nbproject/build-impl.xml | 58 | ||||
-rwxr-xr-x | nbproject/genfiles.properties | 4 | ||||
-rw-r--r-- | src/main/java/com/kitfox/svg/SVGElement.java | 8 |
4 files changed, 63 insertions, 15 deletions
@@ -93,10 +93,16 @@ </target>
<target name="-post-jar">
- <jar destfile="${dist.jar}" update="true">
+ <jar destfile="${dist.jar}" update="false">
<manifest>
<attribute name="Main-Class" value="com.kitfox.svg.app.SVGPlayer"/>
</manifest>
+
+ <fileset dir="build/classes">
+ <include name="**/*.class"/>
+ </fileset>
+ <fileset dir="build/classes/res">
+ </fileset>
</jar>
<delete file="${key.location}"/>
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 49527fb..8389c14 100755 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -19,7 +19,7 @@ is divided into following sections: - cleanup
-->
-<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="svg-salamander-core-impl">
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="svg-salamander-core-impl">
<target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
<!--
======================
@@ -35,18 +35,37 @@ is divided into following sections: <property file="nbproject/private/configs/${config}.properties"/>
<property file="nbproject/private/private.properties"/>
</target>
- <target depends="-pre-init,-init-private" name="-init-user">
+ <target depends="-pre-init,-init-private" name="-init-libraries">
+ <property location="..\libraries\nblibraries.properties" name="libraries.1.path"/>
+ <dirname file="${libraries.1.path}" property="libraries.1.dir.nativedirsep"/>
+ <pathconvert dirsep="/" property="libraries.1.dir">
+ <path path="${libraries.1.dir.nativedirsep}"/>
+ </pathconvert>
+ <basename file="${libraries.1.path}" property="libraries.1.basename" suffix=".properties"/>
+ <touch file="${libraries.1.dir}/${libraries.1.basename}-private.properties"/>
+ <loadproperties srcfile="${libraries.1.dir}/${libraries.1.basename}-private.properties">
+ <filterchain>
+ <replacestring from="$${base}" to="${libraries.1.dir}"/>
+ </filterchain>
+ </loadproperties>
+ <loadproperties srcfile="${libraries.1.path}">
+ <filterchain>
+ <replacestring from="$${base}" to="${libraries.1.dir}"/>
+ </filterchain>
+ </loadproperties>
+ </target>
+ <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
<property file="${user.properties.file}"/>
<!-- The two properties below are usually overridden -->
<!-- by the active platform. Just a fallback. -->
<property name="default.javac.source" value="1.4"/>
<property name="default.javac.target" value="1.4"/>
</target>
- <target depends="-pre-init,-init-private,-init-user" name="-init-project">
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
<property file="nbproject/configs/${config}.properties"/>
<property file="nbproject/project.properties"/>
</target>
- <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
<available file="${manifest.file}" property="manifest.available"/>
<condition property="manifest.available+main.class">
<and>
@@ -128,7 +147,7 @@ is divided into following sections: <!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
<fail unless="src.www.dir">Must set src.www.dir</fail>
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="src.java.dir">Must set src.java.dir</fail>
@@ -231,13 +250,13 @@ is divided into following sections: </sequential>
</macrodef>
</target>
- <target name="-init-macrodef-nbjpda">
+ <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute default="${main.class}" name="name"/>
<attribute default="${debug.classpath}" name="classpath"/>
<attribute default="" name="stopclassname"/>
<sequential>
- <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
<classpath>
<path path="@{classpath}"/>
</classpath>
@@ -248,7 +267,9 @@ is divided into following sections: <attribute default="${build.classes.dir}" name="dir"/>
<sequential>
<nbjpdareload>
- <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
+ <fileset dir="@{dir}" includes="${fix.classes}">
+ <include name="${fix.includes}*.class"/>
+ </fileset>
</nbjpdareload>
</sequential>
</macrodef>
@@ -266,6 +287,12 @@ is divided into following sections: <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
<istrue value="${have-jdk-older-than-1.4}"/>
</condition>
+ <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
+ <os family="windows"/>
+ </condition>
+ <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
+ <isset property="debug.transport"/>
+ </condition>
</target>
<target depends="-init-debug-args" name="-init-macrodef-debug">
<macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
@@ -275,7 +302,7 @@ is divided into following sections: <sequential>
<java classname="@{classname}" dir="${work.dir}" fork="true">
<jvmarg line="${debug-args-line}"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
<jvmarg line="${run.jvmargs}"/>
<classpath>
<path path="@{classpath}"/>
@@ -315,13 +342,20 @@ is divided into following sections: </jar>
</presetdef>
</target>
- <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
<!--
===================
COMPILATION SECTION
===================
-->
<target depends="init" name="deps-jar" unless="no.deps"/>
+ <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
+ <target depends="init" name="-check-automatic-build">
+ <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
+ </target>
+ <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
+ <antcall target="clean"/>
+ </target>
<target depends="init,deps-jar" name="-pre-pre-compile">
<mkdir dir="${build.classes.dir}"/>
</target>
@@ -346,7 +380,7 @@ is divided into following sections: <!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
<target name="-pre-compile-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
@@ -360,7 +394,7 @@ is divided into following sections: <!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
<!--
====================
JAR BUILDING SECTION
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index 0865813..45c7481 100755 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=be360661 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=478066e1
-nbproject/build-impl.xml.script.CRC32=63fa9093
-nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
+nbproject/build-impl.xml.script.CRC32=f848e329
+nbproject/build-impl.xml.stylesheet.CRC32=e55b27f5
diff --git a/src/main/java/com/kitfox/svg/SVGElement.java b/src/main/java/com/kitfox/svg/SVGElement.java index 4a330f4..fe50dd5 100644 --- a/src/main/java/com/kitfox/svg/SVGElement.java +++ b/src/main/java/com/kitfox/svg/SVGElement.java @@ -272,6 +272,14 @@ abstract public class SVGElement implements Serializable {
if (hasAttribute(name, attribType)) throw new SVGElementException(this, "Attribute " + name + "(" + AnimationElement.animationElementToString(attribType) + ") already exists");
+ //Alter layout for id attribute
+ if ("id".equals(name))
+ {
+ diagram.removeElement(this.id);
+ this.id = name;
+ diagram.setElement(this.id, this);
+ }
+
switch (attribType)
{
case AnimationElement.AT_CSS:
|