From 5b97319a2f24a89865e8493bbc519c570362597f Mon Sep 17 00:00:00 2001
From: kitfox
Date: Fri, 25 Apr 2014 10:02:36 +0000
Subject: Can now parse colors set to the empty string.
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@173 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
---
nbproject/build-impl.xml | 26 +++++++++++++---------
nbproject/genfiles.properties | 4 ++--
.../java/com/kitfox/svg/app/beans/SVGIcon.java | 5 +----
src/main/java/com/kitfox/svg/xml/ColorTable.java | 5 +++++
4 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
index 0b8e1ca..61e0dc1 100755
--- a/nbproject/build-impl.xml
+++ b/nbproject/build-impl.xml
@@ -105,9 +105,12 @@ is divided into following sections:
-
-
-
+
+
+
+
+
+
@@ -1247,23 +1250,26 @@ is divided into following sections:
-
+
+
+
+
-
+
-
+
-
+
-
+
-
+
@@ -1351,7 +1357,7 @@ is divided into following sections:
-
+
Some tests failed; see details above.
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
index d96dd94..2f80f91 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=99b9f3f7
-nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46
+nbproject/build-impl.xml.script.CRC32=c34f2ef4
+nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.1.48
diff --git a/src/main/java/com/kitfox/svg/app/beans/SVGIcon.java b/src/main/java/com/kitfox/svg/app/beans/SVGIcon.java
index 30380e5..266e3a4 100644
--- a/src/main/java/com/kitfox/svg/app/beans/SVGIcon.java
+++ b/src/main/java/com/kitfox/svg/app/beans/SVGIcon.java
@@ -53,7 +53,7 @@ public class SVGIcon implements Icon
public static final String PROP_AUTOSIZE = "PROP_AUTOSIZE";
- private PropertyChangeSupport changes = new PropertyChangeSupport(this);
+ private final PropertyChangeSupport changes = new PropertyChangeSupport(this);
SVGUniverse svgUniverse = SVGCache.getSVGUniverse();
public static final int INTERP_NEAREST_NEIGHBOR = 0;
@@ -64,7 +64,6 @@ public class SVGIcon implements Icon
private int interpolation = INTERP_NEAREST_NEIGHBOR;
private boolean clipToViewbox;
-// private String svgPath;
URI svgURI;
// private boolean scaleToFit;
@@ -77,7 +76,6 @@ public class SVGIcon implements Icon
public static final int AUTOSIZE_STRETCH = 4;
private int autosize = AUTOSIZE_NONE;
-// Dimension preferredSize = new Dimension(100, 100);
Dimension preferredSize;
/** Creates a new instance of SVGIcon */
@@ -184,7 +182,6 @@ public class SVGIcon implements Icon
}
-
if (autosize == AUTOSIZE_NONE)
{
try
diff --git a/src/main/java/com/kitfox/svg/xml/ColorTable.java b/src/main/java/com/kitfox/svg/xml/ColorTable.java
index 84a0409..32788a4 100644
--- a/src/main/java/com/kitfox/svg/xml/ColorTable.java
+++ b/src/main/java/com/kitfox/svg/xml/ColorTable.java
@@ -224,6 +224,11 @@ public class ColorTable
{
Color retVal = null;
+ if ("".equals(val))
+ {
+ return null;
+ }
+
if (val.charAt(0) == '#')
{
String hexStrn = val.substring(1);
--
cgit v1.2.3-55-g7522