Index: trunk/src/com/kitfox/svg/A.java
===================================================================
--- trunk/src/com/kitfox/svg/A.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/A.java	(revision 11525)
@@ -56,4 +56,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -61,4 +62,5 @@
     }
     
+    @Override
     protected void build() throws SVGException
     {
@@ -84,4 +86,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Circle.java
===================================================================
--- trunk/src/com/kitfox/svg/Circle.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Circle.java	(revision 11525)
@@ -62,4 +62,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -67,4 +68,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -91,4 +93,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -98,4 +101,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -103,4 +107,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -115,4 +120,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/ClipPath.java
===================================================================
--- trunk/src/com/kitfox/svg/ClipPath.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/ClipPath.java	(revision 11525)
@@ -39,5 +39,4 @@
 import java.awt.Shape;
 import java.awt.geom.Area;
-import java.util.Iterator;
 
 /**
@@ -60,4 +59,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -69,4 +69,5 @@
      * each child tag that has been processed
      */
+    @Override
     public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
     {
@@ -74,4 +75,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -103,7 +105,6 @@
 
         Area clipArea = null;
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            ShapeElement se = (ShapeElement) it.next();
+        for (SVGElement svgElement : children) {
+            ShapeElement se = (ShapeElement) svgElement;
 
             if (clipArea == null)
@@ -136,4 +137,5 @@
      * @throws com.kitfox.svg.SVGException
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Defs.java
===================================================================
--- trunk/src/com/kitfox/svg/Defs.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Defs.java	(revision 11525)
@@ -36,6 +36,4 @@
 package com.kitfox.svg;
 
-import java.util.Iterator;
-
 /**
  * @author Mark McKay
@@ -54,4 +52,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -63,4 +62,5 @@
      * each child tag that has been processed
      */
+    @Override
     public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
     {
@@ -70,10 +70,9 @@
     }
 
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
         boolean stateChange = false;
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement) it.next();
+        for (SVGElement ele : children) {
             stateChange = stateChange || ele.updateTime(curTime);
         }
Index: trunk/src/com/kitfox/svg/Desc.java
===================================================================
--- trunk/src/com/kitfox/svg/Desc.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Desc.java	(revision 11525)
@@ -55,4 +55,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -63,4 +64,5 @@
      * Called during load process to add text scanned within a tag
      */
+    @Override
     public void loaderAddText(SVGLoaderHelper helper, String text)
     {
@@ -73,4 +75,5 @@
     }
 
+    @Override
     public boolean updateTime(double curTime)
     {
Index: trunk/src/com/kitfox/svg/Ellipse.java
===================================================================
--- trunk/src/com/kitfox/svg/Ellipse.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Ellipse.java	(revision 11525)
@@ -63,4 +63,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -68,4 +69,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -97,4 +99,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -104,4 +107,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -109,4 +113,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -121,4 +126,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Filter.java
===================================================================
--- trunk/src/com/kitfox/svg/Filter.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Filter.java	(revision 11525)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or 
+ * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above 
+ *   - Redistributions of source code must retain the above
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials 
+ *     disclaimer in the documentation and/or other materials
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE. 
- * 
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -36,9 +36,10 @@
 package com.kitfox.svg;
 
-import com.kitfox.svg.xml.StyleAttribute;
 import java.awt.geom.Point2D;
 import java.net.URI;
 import java.net.URL;
 import java.util.ArrayList;
+
+import com.kitfox.svg.xml.StyleAttribute;
 
 /**
@@ -62,5 +63,5 @@
     Point2D filterRes = new Point2D.Double();
     URL href = null;
-    final ArrayList filterEffects = new ArrayList();
+    final ArrayList<SVGElement> filterEffects = new ArrayList<>();
 
     /**
@@ -71,4 +72,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -76,4 +78,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -161,4 +164,5 @@
     }
 
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Font.java
===================================================================
--- trunk/src/com/kitfox/svg/Font.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Font.java	(revision 11525)
@@ -59,5 +59,5 @@
     FontFace fontFace = null;
     MissingGlyph missingGlyph = null;
-    final HashMap glyphs = new HashMap();
+    final HashMap<String, SVGElement> glyphs = new HashMap<>();
 
     /**
@@ -68,4 +68,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -77,4 +78,5 @@
      * each child tag that has been processed
      */
+    @Override
     public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
     {
@@ -93,4 +95,5 @@
     }
 
+    @Override
     public void loaderEndElement(SVGLoaderHelper helper) throws SVGParseException
     {
@@ -102,4 +105,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -211,4 +215,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/FontFace.java
===================================================================
--- trunk/src/com/kitfox/svg/FontFace.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/FontFace.java	(revision 11525)
@@ -72,4 +72,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -77,4 +78,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -229,4 +231,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime)
     {
Index: trunk/src/com/kitfox/svg/Glyph.java
===================================================================
--- trunk/src/com/kitfox/svg/Glyph.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Glyph.java	(revision 11525)
@@ -63,4 +63,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -68,4 +69,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -92,4 +94,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Gradient.java
===================================================================
--- trunk/src/com/kitfox/svg/Gradient.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Gradient.java	(revision 11525)
@@ -41,5 +41,4 @@
 import java.net.URI;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -62,5 +61,5 @@
     //Either this gradient contains a list of stops, or it will take it's
     // stops from the referenced gradient
-    ArrayList stops = new ArrayList();
+    ArrayList<Stop> stops = new ArrayList<>();
     URI stopRef = null;
     protected AffineTransform gradientTransform = null;
@@ -77,4 +76,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -86,4 +86,5 @@
      * each child tag that has been processed
      */
+    @Override
     public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
     {
@@ -97,4 +98,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -173,7 +175,5 @@
         stopFractions = new float[stops.size()];
         int idx = 0;
-        for (Iterator it = stops.iterator(); it.hasNext();)
-        {
-            Stop stop = (Stop) it.next();
+        for (Stop stop : stops) {
             float val = stop.offset;
             if (idx != 0 && val < stopFractions[idx - 1])
@@ -202,7 +202,5 @@
         stopColors = new Color[stops.size()];
         int idx = 0;
-        for (Iterator it = stops.iterator(); it.hasNext();)
-        {
-            Stop stop = (Stop) it.next();
+        for (Stop stop : stops) {
             int stopColorVal = stop.color.getRGB();
             Color stopColor = new Color((stopColorVal >> 16) & 0xff, (stopColorVal >> 8) & 0xff, stopColorVal & 0xff, clamp((int) (stop.opacity * 255), 0, 255));
@@ -255,4 +253,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
@@ -262,5 +261,4 @@
         //Get current values for parameters
         StyleAttribute sty = new StyleAttribute();
-        boolean shapeChange = false;
         String strn;
 
@@ -335,7 +333,5 @@
 
         //Check stops, if any
-        for (Iterator it = stops.iterator(); it.hasNext();)
-        {
-            Stop stop = (Stop) it.next();
+        for (Stop stop : stops) {
             if (stop.updateTime(curTime))
             {
Index: trunk/src/com/kitfox/svg/Group.java
===================================================================
--- trunk/src/com/kitfox/svg/Group.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Group.java	(revision 11525)
@@ -66,4 +66,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -75,4 +76,5 @@
      * each child tag that has been processed
      */
+    @Override
     public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
     {
@@ -98,5 +100,6 @@
     }
 
-    void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException
+    @Override
+    void pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
     {
         Point2D xPoint = new Point2D.Double(point.getX(), point.getY());
@@ -113,7 +116,5 @@
 
 
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement) it.next();
+        for (SVGElement ele : children) {
             if (ele instanceof RenderableElement)
             {
@@ -125,5 +126,6 @@
     }
 
-    void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List retVec) throws SVGException
+    @Override
+    void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
     {
         if (xform != null)
@@ -134,7 +136,5 @@
 
 
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement) it.next();
+        for (SVGElement ele : children) {
             if (ele instanceof RenderableElement)
             {
@@ -146,4 +146,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -169,5 +170,5 @@
         beginLayer(g);
 
-        Iterator it = children.iterator();
+        Iterator<SVGElement> it = children.iterator();
 
 //        try
@@ -185,5 +186,5 @@
         while (it.hasNext())
         {
-            SVGElement ele = (SVGElement) it.next();
+            SVGElement ele = it.next();
             if (ele instanceof RenderableElement)
             {
@@ -212,4 +213,5 @@
      * Retrieves the cached bounding box of this group
      */
+    @Override
     public Shape getShape()
     {
@@ -225,8 +227,5 @@
         Area retShape = new Area();
 
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement) it.next();
-
+        for (SVGElement ele : children) {
             if (ele instanceof ShapeElement)
             {
@@ -246,4 +245,5 @@
      * Retrieves the cached bounding box of this group
      */
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -262,11 +262,7 @@
     public void calcBoundingBox() throws SVGException
     {
-//        Rectangle2D retRect = new Rectangle2D.Float();
         Rectangle2D retRect = null;
 
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement) it.next();
-
+        for (SVGElement ele : children) {
             if (ele instanceof RenderableElement)
             {
@@ -304,13 +300,14 @@
     }
 
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
         boolean changeState = super.updateTime(curTime);
-        Iterator it = children.iterator();
+        Iterator<SVGElement> it = children.iterator();
 
         //Distribute message to all members of this group
         while (it.hasNext())
         {
-            SVGElement ele = (SVGElement) it.next();
+            SVGElement ele = it.next();
             boolean updateVal = ele.updateTime(curTime);
 
Index: trunk/src/com/kitfox/svg/Hkern.java
===================================================================
--- trunk/src/com/kitfox/svg/Hkern.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Hkern.java	(revision 11525)
@@ -50,4 +50,5 @@
     int k;
 
+    @Override
     public String getTagName()
     {
@@ -55,4 +56,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -79,4 +81,5 @@
     }
 
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/ImageSVG.java
===================================================================
--- trunk/src/com/kitfox/svg/ImageSVG.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/ImageSVG.java	(revision 11525)
@@ -77,4 +77,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -82,4 +83,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -185,5 +187,6 @@
     }
 
-    void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException
+    @Override
+    void pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
     {
         if (getBoundingBox().contains(point))
@@ -193,5 +196,6 @@
     }
 
-    void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List retVec) throws SVGException
+    @Override
+    void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
     {
         if (ltw.createTransformedShape(getBoundingBox()).intersects(pickArea))
@@ -201,4 +205,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -262,4 +267,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox()
     {
@@ -274,4 +280,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Line.java
===================================================================
--- trunk/src/com/kitfox/svg/Line.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Line.java	(revision 11525)
@@ -63,4 +63,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -68,4 +69,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -97,4 +99,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -104,4 +107,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -109,4 +113,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -121,4 +126,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/LinearGradient.java
===================================================================
--- trunk/src/com/kitfox/svg/LinearGradient.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/LinearGradient.java	(revision 11525)
@@ -65,4 +65,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -70,4 +71,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -97,4 +99,5 @@
     }
 
+    @Override
     public Paint getPaint(Rectangle2D bounds, AffineTransform xform)
     {
@@ -168,4 +171,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Marker.java
===================================================================
--- trunk/src/com/kitfox/svg/Marker.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Marker.java	(revision 11525)
@@ -61,4 +61,5 @@
     boolean markerUnitsStrokeWidth = true; //if set to false 'userSpaceOnUse' is assumed
 
+    @Override
     public String getTagName()
     {
@@ -66,4 +67,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -131,4 +133,5 @@
     }
 
+    @Override
     protected boolean outsideClip(Graphics2D g) throws SVGException
     {
@@ -144,4 +147,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -173,4 +177,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -179,4 +184,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -192,4 +198,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
@@ -229,5 +236,5 @@
     {
 
-        private ArrayList markerList = new ArrayList();
+        private ArrayList<MarkerPos> markerList = new ArrayList<MarkerPos>();
         boolean started = false;
 
@@ -362,5 +369,5 @@
          * @return the markerList
          */
-        public ArrayList getMarkerList()
+        public ArrayList<MarkerPos> getMarkerList()
         {
             return markerList;
Index: trunk/src/com/kitfox/svg/Metadata.java
===================================================================
--- trunk/src/com/kitfox/svg/Metadata.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Metadata.java	(revision 11525)
@@ -53,4 +53,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -58,4 +59,5 @@
     }
 
+    @Override
     public boolean updateTime(double curTime)
     {
Index: trunk/src/com/kitfox/svg/MissingGlyph.java
===================================================================
--- trunk/src/com/kitfox/svg/MissingGlyph.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/MissingGlyph.java	(revision 11525)
@@ -73,4 +73,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -82,4 +83,5 @@
      * each child tag that has been processed
      */
+    @Override
     public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
     {
@@ -87,4 +89,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -153,4 +156,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -162,8 +166,8 @@
         }
 
-        Iterator it = children.iterator();
+        Iterator<SVGElement> it = children.iterator();
         while (it.hasNext())
         {
-            SVGElement ele = (SVGElement) it.next();
+            SVGElement ele = it.next();
             if (ele instanceof RenderableElement)
             {
@@ -212,4 +216,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -221,4 +226,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -237,4 +243,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Path.java
===================================================================
--- trunk/src/com/kitfox/svg/Path.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Path.java	(revision 11525)
@@ -63,4 +63,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -68,4 +69,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -86,4 +88,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -93,4 +96,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -98,4 +102,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -110,4 +115,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/PatternSVG.java
===================================================================
--- trunk/src/com/kitfox/svg/PatternSVG.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/PatternSVG.java	(revision 11525)
@@ -47,5 +47,4 @@
 import java.awt.image.BufferedImage;
 import java.net.URI;
-import java.util.Iterator;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -77,4 +76,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -86,4 +86,5 @@
      * each child tag that has been processed
      */
+    @Override
     public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
     {
@@ -91,4 +92,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -227,7 +229,5 @@
         g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
 
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement) it.next();
+        for (SVGElement ele : children) {
             if (ele instanceof RenderableElement)
             {
@@ -264,4 +264,5 @@
     }
 
+    @Override
     public Paint getPaint(Rectangle2D bounds, AffineTransform xform)
     {
@@ -276,4 +277,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Polygon.java
===================================================================
--- trunk/src/com/kitfox/svg/Polygon.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Polygon.java	(revision 11525)
@@ -62,4 +62,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -67,4 +68,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -97,4 +99,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -104,4 +107,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -109,4 +113,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -121,4 +126,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Polyline.java
===================================================================
--- trunk/src/com/kitfox/svg/Polyline.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Polyline.java	(revision 11525)
@@ -62,4 +62,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -67,4 +68,5 @@
     }
 
+    @Override
     public void build() throws SVGException
     {
@@ -96,4 +98,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -103,4 +106,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -108,4 +112,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -120,4 +125,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/RadialGradient.java
===================================================================
--- trunk/src/com/kitfox/svg/RadialGradient.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/RadialGradient.java	(revision 11525)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or
+ * Redistribution and use in source and binary forms, with or 
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above
+ *   - Redistributions of source code must retain the above 
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials
+ *     disclaimer in the documentation and/or other materials 
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ * 
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -36,4 +36,5 @@
 package com.kitfox.svg;
 
+import com.kitfox.svg.xml.StyleAttribute;
 import java.awt.MultipleGradientPaint;
 import java.awt.Paint;
@@ -42,7 +43,4 @@
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
-import java.util.Arrays;
-
-import com.kitfox.svg.xml.StyleAttribute;
 
 /**
Index: trunk/src/com/kitfox/svg/Rect.java
===================================================================
--- trunk/src/com/kitfox/svg/Rect.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Rect.java	(revision 11525)
@@ -69,4 +69,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -132,4 +133,5 @@
      }
      */
+    @Override
     protected void build() throws SVGException
     {
@@ -200,4 +202,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -207,4 +210,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -212,4 +216,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -224,4 +229,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/RenderableElement.java
===================================================================
--- trunk/src/com/kitfox/svg/RenderableElement.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/RenderableElement.java	(revision 11525)
@@ -73,4 +73,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -96,7 +97,7 @@
     abstract public void render(Graphics2D g) throws SVGException;
 
-    abstract void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException;
+    abstract void pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException;
 
-    abstract void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List retVec) throws SVGException;
+    abstract void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException;
 
     abstract public Rectangle2D getBoundingBox() throws SVGException;
Index: trunk/src/com/kitfox/svg/SVGDiagram.java
===================================================================
--- trunk/src/com/kitfox/svg/SVGDiagram.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/SVGDiagram.java	(revision 11525)
@@ -62,5 +62,5 @@
     
     //Indexes elements within this SVG diagram
-    final HashMap idMap = new HashMap();
+    final HashMap<String, SVGElement> idMap = new HashMap<>();
 
     SVGRoot root;
@@ -116,14 +116,14 @@
      * @return the passed in list
      */
-    public List pick(Point2D point, List retVec) throws SVGException
+    public List<List<SVGElement>> pick(Point2D point, List<List<SVGElement>> retVec) throws SVGException
     {
         return pick(point, false, retVec);
     }
     
-    public List pick(Point2D point, boolean boundingBox, List retVec) throws SVGException
+    public List<List<SVGElement>> pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
     {
         if (retVec == null)
         {
-            retVec = new ArrayList();
+            retVec = new ArrayList<>();
         }
         
@@ -133,14 +133,14 @@
     }
 
-    public List pick(Rectangle2D pickArea, List retVec) throws SVGException
+    public List<List<SVGElement>> pick(Rectangle2D pickArea, List<List<SVGElement>> retVec) throws SVGException
     {
         return pick(pickArea, false, retVec);
     }
     
-    public List pick(Rectangle2D pickArea, boolean boundingBox, List retVec) throws SVGException
+    public List<List<SVGElement>> pick(Rectangle2D pickArea, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
     {
         if (retVec == null)
         {
-            retVec = new ArrayList();
+            retVec = new ArrayList<>();
         }
         
Index: trunk/src/com/kitfox/svg/SVGElement.java
===================================================================
--- trunk/src/com/kitfox/svg/SVGElement.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/SVGElement.java	(revision 11525)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or 
+ * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above 
+ *   - Redistributions of source code must retain the above
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials 
+ *     disclaimer in the documentation and/or other materials
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE. 
- * 
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -35,4 +35,22 @@
  */
 package com.kitfox.svg;
+
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.io.Serializable;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
 
 import com.kitfox.svg.pathcmd.Arc;
@@ -51,21 +69,4 @@
 import com.kitfox.svg.xml.StyleSheet;
 import com.kitfox.svg.xml.XMLParseUtil;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.GeneralPath;
-import java.io.Serializable;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
 
 /**
@@ -79,5 +80,5 @@
     public static final String SVG_NS = "http://www.w3.org/2000/svg";
     protected SVGElement parent = null;
-    protected final ArrayList children = new ArrayList();
+    protected final ArrayList<SVGElement> children = new ArrayList<>();
     protected String id = null;
     /**
@@ -88,19 +89,19 @@
      * Styles defined for this elemnt via the <b>style</b> attribute.
      */
-    protected final HashMap inlineStyles = new HashMap();
+    protected final HashMap<String, StyleAttribute> inlineStyles = new HashMap<>();
     /**
      * Presentation attributes set for this element. Ie, any attribute other
      * than the <b>style</b> attribute.
      */
-    protected final HashMap presAttribs = new HashMap();
+    protected final HashMap<String, StyleAttribute> presAttribs = new HashMap<>();
     /**
      * A list of presentation attributes to not include in the presentation
      * attribute set.
      */
-    protected static final Set ignorePresAttrib;
+    protected static final Set<String> ignorePresAttrib;
 
     static
     {
-        HashSet set = new HashSet();
+        HashSet<String> set = new HashSet<>();
 //        set.add("id");
 //        set.add("class");
@@ -157,9 +158,9 @@
      * @return an ordered list of nodes from the root of the tree to this node
      */
-    public List getPath(List retVec)
+    public List<SVGElement> getPath(List<SVGElement> retVec)
     {
         if (retVec == null)
         {
-            retVec = new ArrayList();
+            retVec = new ArrayList<>();
         }
 
@@ -179,9 +180,9 @@
      * @return The list containing the children of this group
      */
-    public List getChildren(List retVec)
+    public List<SVGElement> getChildren(List<SVGElement> retVec)
     {
         if (retVec == null)
         {
-            retVec = new ArrayList();
+            retVec = new ArrayList<>();
         }
 
@@ -197,7 +198,5 @@
     public SVGElement getChild(String id)
     {
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement) it.next();
+        for (SVGElement ele : children) {
             String eleId = ele.getId();
             if (eleId != null && eleId.equals(id))
@@ -234,5 +233,5 @@
         }
 
-        Object temp = children.get(i);
+        SVGElement temp = children.get(i);
         children.set(i, children.get(j));
         children.set(j, temp);
@@ -269,5 +268,5 @@
         if (style != null)
         {
-            HashMap map = XMLParseUtil.parseStyle(style, inlineStyles);
+            HashMap<?, ?> map = XMLParseUtil.parseStyle(style, inlineStyles);
         }
 
@@ -302,5 +301,5 @@
      * @return a set of Strings that corespond to CSS attributes on this element
      */
-    public Set getInlineAttributes()
+    public Set<String> getInlineAttributes()
     {
         return inlineStyles.keySet();
@@ -310,5 +309,5 @@
      * @return a set of Strings that corespond to XML attributes on this element
      */
-    public Set getPresentationAttributes()
+    public Set<String> getPresentationAttributes()
     {
         return presAttribs.keySet();
@@ -330,7 +329,5 @@
         this.diagram = diagram;
         diagram.setElement(id, this);
-        for (Iterator it = children.iterator(); it.hasNext();)
-        {
-            SVGElement ele = (SVGElement) it.next();
+        for (SVGElement ele : children) {
             ele.setDiagram(diagram);
         }
@@ -400,5 +397,5 @@
         for (int i = 0; i < children.size(); ++i)
         {
-            SVGElement ele = (SVGElement) children.get(i);
+            SVGElement ele = children.get(i);
             ele.build();
         }
@@ -418,5 +415,5 @@
         return id;
     }
-    LinkedList contexts = new LinkedList();
+    LinkedList<SVGElement> contexts = new LinkedList<>();
 
     /**
@@ -431,5 +428,5 @@
     protected SVGElement popParentContext()
     {
-        return (SVGElement) contexts.removeLast();
+        return contexts.removeLast();
     }
 
@@ -474,5 +471,5 @@
 
         //Check for local inline styles
-        StyleAttribute styAttr = (StyleAttribute)inlineStyles.get(styName);
+        StyleAttribute styAttr = inlineStyles.get(styName);
 
         attrib.setStringValue(styAttr == null ? "" : styAttr.getStringValue());
@@ -486,5 +483,5 @@
 
         //Check for presentation attribute
-        StyleAttribute presAttr = (StyleAttribute)presAttribs.get(styName);
+        StyleAttribute presAttr = presAttribs.get(styName);
 
         attrib.setStringValue(presAttr == null ? "" : presAttr.getStringValue());
@@ -533,5 +530,5 @@
     {
         //Check for local inline styles
-        return (StyleAttribute) inlineStyles.get(styName);
+        return inlineStyles.get(styName);
     }
 
@@ -546,5 +543,5 @@
 
         //Make sure we have a coresponding presentation attribute
-        StyleAttribute presAttr = (StyleAttribute) presAttribs.get(presName);
+        StyleAttribute presAttr = presAttribs.get(presName);
 
         //Copy presentation value directly
@@ -568,5 +565,5 @@
     {
         //Check for local inline styles
-        return (StyleAttribute) presAttribs.get(styName);
+        return presAttribs.get(styName);
     }
 
@@ -601,5 +598,5 @@
         String function = matchWord.group().toLowerCase();
 
-        LinkedList termList = new LinkedList();
+        LinkedList<String> termList = new LinkedList<>();
         while (matchWord.find())
         {
@@ -609,9 +606,9 @@
 
         double[] terms = new double[termList.size()];
-        Iterator it = termList.iterator();
+        Iterator<String> it = termList.iterator();
         int count = 0;
         while (it.hasNext())
         {
-            terms[count++] = XMLParseUtil.parseDouble((String) it.next());
+            terms[count++] = XMLParseUtil.parseDouble(it.next());
         }
 
@@ -661,7 +658,7 @@
     }
 
-    static protected float nextFloat(LinkedList l)
-    {
-        String s = (String) l.removeFirst();
+    static protected float nextFloat(LinkedList<String> l)
+    {
+        String s = l.removeFirst();
         return Float.parseFloat(s);
     }
@@ -672,5 +669,5 @@
 
         //Tokenize
-        LinkedList tokens = new LinkedList();
+        LinkedList<String> tokens = new LinkedList<>();
         while (matchPathCmd.find())
         {
@@ -680,9 +677,9 @@
 
         boolean defaultRelative = false;
-        LinkedList cmdList = new LinkedList();
+        LinkedList<PathCommand> cmdList = new LinkedList<>();
         char curCmd = 'Z';
         while (tokens.size() != 0)
         {
-            String curToken = (String) tokens.removeFirst();
+            String curToken = tokens.removeFirst();
             char initChar = curToken.charAt(0);
             if ((initChar >= 'A' && initChar <= 'Z') || (initChar >= 'a' && initChar <= 'z'))
@@ -825,5 +822,5 @@
     public SVGElement getChild(int i)
     {
-        return (SVGElement) children.get(i);
+        return children.get(i);
     }
 
Index: trunk/src/com/kitfox/svg/SVGLoader.java
===================================================================
--- trunk/src/com/kitfox/svg/SVGLoader.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/SVGLoader.java	(revision 11525)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or 
+ * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above 
+ *   - Redistributions of source code must retain the above
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials 
+ *     disclaimer in the documentation and/or other materials
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE. 
- * 
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -38,11 +38,14 @@
 
 
-import java.util.*;
-import java.net.*;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
+import java.net.URI;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 /**
@@ -52,9 +55,9 @@
 public class SVGLoader extends DefaultHandler
 {
-    final HashMap nodeClasses = new HashMap();
+    final HashMap<String, Class<?>> nodeClasses = new HashMap<>();
     //final HashMap attribClasses = new HashMap();
-    final LinkedList buildStack = new LinkedList();
-
-    final HashSet ignoreClasses = new HashSet();
+    final LinkedList<SVGElement> buildStack = new LinkedList<>();
+
+    final HashSet<String> ignoreClasses = new HashSet<>();
 
     final SVGLoaderHelper helper;
@@ -73,5 +76,5 @@
 
     final boolean verbose;
-    
+
     /** Creates a new instance of SVGLoader */
     public SVGLoader(URI xmlBase, SVGUniverse universe)
@@ -79,9 +82,9 @@
         this(xmlBase, universe, false);
     }
-    
+
     public SVGLoader(URI xmlBase, SVGUniverse universe, boolean verbose)
     {
         this.verbose = verbose;
-        
+
         diagram = new SVGDiagram(xmlBase, universe);
 
@@ -138,5 +141,6 @@
         return sb.toString();
     }
-    
+
+    @Override
     public void startDocument() throws SAXException
     {
@@ -146,4 +150,5 @@
     }
 
+    @Override
     public void endDocument() throws SAXException
     {
@@ -151,4 +156,5 @@
     }
 
+    @Override
     public void startElement(String namespaceURI, String sName, String qName, Attributes attrs) throws SAXException
     {
@@ -158,5 +164,5 @@
         }
         indent++;
-        
+
         if (skipNonSVGTagDepth != 0 || (!namespaceURI.equals("") && !namespaceURI.equals(SVGElement.SVG_NS)))
         {
@@ -164,5 +170,5 @@
             return;
         }
-        
+
         sName = sName.toLowerCase();
 
@@ -187,9 +193,9 @@
 
         try {
-            Class cls = (Class)obj;
+            Class<?> cls = (Class<?>)obj;
             SVGElement svgEle = (SVGElement)cls.newInstance();
 
             SVGElement parent = null;
-            if (buildStack.size() != 0) parent = (SVGElement)buildStack.getLast();
+            if (buildStack.size() != 0) parent = buildStack.getLast();
             svgEle.loaderStartElement(helper, attrs, parent);
 
@@ -198,5 +204,5 @@
         catch (Exception e)
         {
-            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, 
+            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING,
                 "Could not load", e);
             throw new SAXException(e);
@@ -205,4 +211,5 @@
     }
 
+    @Override
     public void endElement(String namespaceURI, String sName, String qName)
         throws SAXException
@@ -213,5 +220,5 @@
             System.err.println(printIndent(indent, " ") + "Ending parse of tag " + sName+ ": " + namespaceURI);
         }
-        
+
         if (skipNonSVGTagDepth != 0)
         {
@@ -219,5 +226,5 @@
             return;
         }
-        
+
         sName = sName.toLowerCase();
 
@@ -230,5 +237,5 @@
 
         try {
-            SVGElement svgEle = (SVGElement)buildStack.removeLast();
+            SVGElement svgEle = buildStack.removeLast();
 
             svgEle.loaderEndElement(helper);
@@ -237,5 +244,5 @@
             if (buildStack.size() != 0)
             {
-                parent = (SVGElement)buildStack.getLast();
+                parent = buildStack.getLast();
             }
             //else loadRoot = (SVGElement)svgEle;
@@ -253,5 +260,5 @@
         catch (Exception e)
         {
-            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, 
+            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING,
                 "Could not parse", e);
             throw new SAXException(e);
@@ -259,4 +266,5 @@
     }
 
+    @Override
     public void characters(char buf[], int offset, int len)
         throws SAXException
@@ -269,5 +277,5 @@
         if (buildStack.size() != 0)
         {
-            SVGElement parent = (SVGElement)buildStack.getLast();
+            SVGElement parent = buildStack.getLast();
             String s = new String(buf, offset, len);
             parent.loaderAddText(helper, s);
@@ -275,4 +283,5 @@
     }
 
+    @Override
     public void processingInstruction(String target, String data)
         throws SAXException
@@ -280,5 +289,5 @@
         //Check for external style sheet
     }
-    
+
 //    public SVGElement getLoadRoot() { return loadRoot; }
     public SVGDiagram getLoadedDiagram() { return diagram; }
Index: trunk/src/com/kitfox/svg/SVGLoaderHelper.java
===================================================================
--- trunk/src/com/kitfox/svg/SVGLoaderHelper.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/SVGLoaderHelper.java	(revision 11525)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or 
+ * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above 
+ *   - Redistributions of source code must retain the above
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials 
+ *     disclaimer in the documentation and/or other materials
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE. 
- * 
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -37,5 +37,5 @@
 package com.kitfox.svg;
 
-import java.net.*;
+import java.net.URI;
 
 /**
@@ -56,5 +56,5 @@
 
     public final URI xmlBase;
-    
+
     /** Creates a new instance of SVGLoaderHelper */
     public SVGLoaderHelper(URI xmlBase, SVGUniverse universe, SVGDiagram diagram)
Index: trunk/src/com/kitfox/svg/SVGRoot.java
===================================================================
--- trunk/src/com/kitfox/svg/SVGRoot.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/SVGRoot.java	(revision 11525)
@@ -93,4 +93,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -98,4 +99,5 @@
     }
     
+    @Override
     public void build() throws SVGException
     {
@@ -163,4 +165,5 @@
     }
 
+    @Override
     public SVGRoot getRoot()
     {
@@ -262,7 +265,15 @@
     {
         prepareViewport();
-
+        
         Rectangle targetViewport = g.getClipBounds();
-
+//
+//        if (targetViewport == null)
+//        {
+//            Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
+//            targetViewport = new Rectangle(0, 0, size.width, size.height);
+//        }
+//        clipRect.setRect(targetViewport);
+
+        
         Rectangle deviceViewport = diagram.getDeviceViewport();
         if (width != null && height != null)
@@ -294,4 +305,6 @@
         else
         {
+//            Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
+//            targetViewport = new Rectangle(0, 0, size.width, size.height);
             targetViewport = new Rectangle(deviceViewport);
         }
@@ -319,5 +332,6 @@
     }
 
-    public void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List retVec) throws SVGException
+    @Override
+    public void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
     {
         if (viewXform != null)
@@ -330,5 +344,6 @@
     }
     
-    public void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException
+    @Override
+    public void pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
     {
         Point2D xPoint = new Point2D.Double(point.getX(), point.getY());
@@ -347,4 +362,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -353,4 +369,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -381,4 +398,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/SVGUniverse.java
===================================================================
--- trunk/src/com/kitfox/svg/SVGUniverse.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/SVGUniverse.java	(revision 11525)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or 
+ * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above 
+ *   - Redistributions of source code must retain the above
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials 
+ *     disclaimer in the documentation and/or other materials
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE. 
- * 
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -36,5 +36,4 @@
 package com.kitfox.svg;
 
-import com.kitfox.svg.app.beans.SVGIcon;
 import java.awt.Graphics2D;
 import java.awt.image.BufferedImage;
@@ -58,11 +57,12 @@
 import java.util.Base64;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.zip.GZIPInputStream;
+
 import javax.imageio.ImageIO;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParserFactory;
+
 import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
@@ -70,4 +70,6 @@
 import org.xml.sax.SAXParseException;
 import org.xml.sax.XMLReader;
+
+import com.kitfox.svg.app.beans.SVGIcon;
 
 /**
@@ -89,7 +91,7 @@
      * initiated from streams will have the scheme <i>svgSalamander</i>.
      */
-    final HashMap loadedDocs = new HashMap();
-    final HashMap loadedFonts = new HashMap();
-    final HashMap loadedImages = new HashMap();
+    final HashMap<URI, SVGDiagram> loadedDocs = new HashMap<>();
+    final HashMap<String, Font> loadedFonts = new HashMap<>();
+    final HashMap<URL, SoftReference<BufferedImage>> loadedImages = new HashMap<>();
     public static final String INPUTSTREAM_SCHEME = "svgSalamander";
     /**
@@ -141,7 +143,6 @@
     public Font getDefaultFont()
     {
-        for (Iterator it = loadedFonts.values().iterator(); it.hasNext();)
-        {
-            return (Font) it.next();
+        for (Font font : loadedFonts.values()) {
+            return font;
         }
         return null;
@@ -150,5 +151,5 @@
     public Font getFont(String fontName)
     {
-        return (Font) loadedFonts.get(fontName);
+        return loadedFonts.get(fontName);
     }
 
@@ -183,5 +184,5 @@
                     }
 
-                    SoftReference ref = new SoftReference(img);
+                    SoftReference<BufferedImage> ref = new SoftReference<>(img);
                     loadedImages.put(url, ref);
 
@@ -218,5 +219,5 @@
         }
 
-        SoftReference ref;
+        SoftReference<BufferedImage> ref;
         try
         {
@@ -231,9 +232,9 @@
                 icon.paintIcon(null, g, 0, 0);
                 g.dispose();
-                ref = new SoftReference(img);
+                ref = new SoftReference<>(img);
             } else
             {
                 BufferedImage img = ImageIO.read(imageURL);
-                ref = new SoftReference(img);
+                ref = new SoftReference<>(img);
             }
             loadedImages.put(imageURL, ref);
@@ -247,5 +248,5 @@
     BufferedImage getImage(URL imageURL)
     {
-        SoftReference ref = (SoftReference) loadedImages.get(imageURL);
+        SoftReference<BufferedImage> ref = loadedImages.get(imageURL);
         if (ref == null)
         {
@@ -253,5 +254,5 @@
         }
 
-        BufferedImage img = (BufferedImage) ref.get();
+        BufferedImage img = ref.get();
         //If image was cleared from memory, reload it
         if (img == null)
@@ -265,5 +266,5 @@
                     "Could not load image", e);
             }
-            ref = new SoftReference(img);
+            ref = new SoftReference<>(img);
             loadedImages.put(imageURL, ref);
         }
@@ -308,5 +309,5 @@
             URI xmlBase = new URI(path.getScheme(), path.getSchemeSpecificPart(), null);
 
-            SVGDiagram dia = (SVGDiagram) loadedDocs.get(xmlBase);
+            SVGDiagram dia = loadedDocs.get(xmlBase);
             if (dia == null && loadIfAbsent)
             {
@@ -316,5 +317,5 @@
 
                 loadSVG(url, false);
-                dia = (SVGDiagram) loadedDocs.get(xmlBase);
+                dia = loadedDocs.get(xmlBase);
                 if (dia == null)
                 {
@@ -349,5 +350,5 @@
         }
 
-        SVGDiagram dia = (SVGDiagram) loadedDocs.get(xmlBase);
+        SVGDiagram dia = loadedDocs.get(xmlBase);
         if (dia != null || !loadIfAbsent)
         {
@@ -372,5 +373,5 @@
 
             loadSVG(url, false);
-            dia = (SVGDiagram) loadedDocs.get(xmlBase);
+            dia = loadedDocs.get(xmlBase);
             return dia;
         } catch (Exception e)
@@ -604,14 +605,14 @@
     /**
      * Get list of uris of all loaded documents and subdocuments.
-     * @return 
-     */
-    public ArrayList getLoadedDocumentURIs()
-    {
-        return new ArrayList(loadedDocs.keySet());
-    }
-    
+     * @return
+     */
+    public ArrayList<URI> getLoadedDocumentURIs()
+    {
+        return new ArrayList<>(loadedDocs.keySet());
+    }
+
     /**
      * Remove loaded document from cache.
-     * @param uri 
+     * @param uri
      */
     public void removeDocument(URI uri)
@@ -619,5 +620,5 @@
         loadedDocs.remove(uri);
     }
-    
+
     public boolean isVerbose()
     {
Index: trunk/src/com/kitfox/svg/ShapeElement.java
===================================================================
--- trunk/src/com/kitfox/svg/ShapeElement.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/ShapeElement.java	(revision 11525)
@@ -87,5 +87,5 @@
 
     @Override
-    void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException
+    void pick(Point2D point, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
     {
 //        StyleAttribute styleAttrib = new StyleAttribute();
@@ -98,7 +98,7 @@
 
     @Override
-    void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List retVec) throws SVGException
-    {
-        StyleAttribute styleAttrib = new StyleAttribute();
+    void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List<List<SVGElement>> retVec) throws SVGException
+    {
+//        StyleAttribute styleAttrib = new StyleAttribute();
 //        if (getStyle(styleAttrib.setName("fill")) && getShape().contains(point))
         if (ltw.createTransformedShape((boundingBox ? getBoundingBox() : getShape())).intersects(pickArea))
@@ -397,8 +397,8 @@
             layout.layout(shape);
             
-            ArrayList list = layout.getMarkerList();
+            ArrayList<MarkerPos> list = layout.getMarkerList();
             for (int i = 0; i < list.size(); ++i)
             {
-                MarkerPos pos = (MarkerPos)list.get(i);
+                MarkerPos pos = list.get(i);
 
                 switch (pos.type)
Index: trunk/src/com/kitfox/svg/Stop.java
===================================================================
--- trunk/src/com/kitfox/svg/Stop.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Stop.java	(revision 11525)
@@ -58,4 +58,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -63,4 +64,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -105,4 +107,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Style.java
===================================================================
--- trunk/src/com/kitfox/svg/Style.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Style.java	(revision 11525)
@@ -62,4 +62,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -70,4 +71,5 @@
      * Called during load process to add text scanned within a tag
      */
+    @Override
     public void loaderAddText(SVGLoaderHelper helper, String text)
     {
@@ -78,4 +80,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -90,4 +93,5 @@
     }
 
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Symbol.java
===================================================================
--- trunk/src/com/kitfox/svg/Symbol.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Symbol.java	(revision 11525)
@@ -61,4 +61,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -66,4 +67,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -94,4 +96,5 @@
     }
 
+    @Override
     protected boolean outsideClip(Graphics2D g) throws SVGException
     {
@@ -108,4 +111,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -118,4 +122,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -124,4 +129,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -137,4 +143,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Text.java
===================================================================
--- trunk/src/com/kitfox/svg/Text.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Text.java	(revision 11525)
@@ -44,6 +44,7 @@
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
-import java.util.Iterator;
+import java.io.Serializable;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -63,5 +64,5 @@
     float fontSize;
     //List of strings and tspans containing the content of this node
-    LinkedList content = new LinkedList();
+    LinkedList<Serializable> content = new LinkedList<>();
     Shape textShape;
     public static final int TXAN_START = 0;
@@ -98,4 +99,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -122,5 +124,5 @@
     }
 
-    public java.util.List getContent()
+    public List<Serializable> getContent()
     {
         return content;
@@ -131,4 +133,5 @@
      * each child tag that has been processed
      */
+    @Override
     public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
     {
@@ -141,4 +144,5 @@
      * Called during load process to add text scanned within a tag
      */
+    @Override
     public void loaderAddText(SVGLoaderHelper helper, String text)
     {
@@ -150,4 +154,5 @@
     }
 
+    @Override
     public void build() throws SVGException
     {
@@ -273,5 +278,5 @@
             }
         }
-
+        
         if (font == null)
         {
@@ -286,8 +291,5 @@
         AffineTransform xform = new AffineTransform();
 
-        for (Iterator it = content.iterator(); it.hasNext();)
-        {
-            Object obj = it.next();
-
+        for (Serializable obj : content) {
             if (obj instanceof String)
             {
@@ -451,4 +453,5 @@
 //    }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -458,4 +461,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -463,4 +467,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -475,4 +480,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Title.java
===================================================================
--- trunk/src/com/kitfox/svg/Title.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Title.java	(revision 11525)
@@ -55,4 +55,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -63,4 +64,5 @@
      * Called during load process to add text scanned within a tag
      */
+    @Override
     public void loaderAddText(SVGLoaderHelper helper, String text)
     {
@@ -80,4 +82,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/TransformableElement.java
===================================================================
--- trunk/src/com/kitfox/svg/TransformableElement.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/TransformableElement.java	(revision 11525)
@@ -87,4 +87,5 @@
      */
 
+    @Override
     protected void build() throws SVGException
     {
@@ -124,4 +125,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Tspan.java
===================================================================
--- trunk/src/com/kitfox/svg/Tspan.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Tspan.java	(revision 11525)
@@ -41,6 +41,4 @@
 import java.awt.Shape;
 import java.awt.font.FontRenderContext;
-import java.awt.font.GlyphMetrics;
-import java.awt.font.GlyphVector;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.GeneralPath;
@@ -73,4 +71,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -125,4 +124,5 @@
      * Called during load process to add text scanned within a tag
      */
+    @Override
     public void loaderAddText(SVGLoaderHelper helper, String text)
     {
@@ -130,4 +130,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -340,4 +341,5 @@
 //    }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -433,5 +435,4 @@
         float cursorY = 0;
     
-        int posPtr = 1;
         FontRenderContext frc = g.getFontRenderContext();
 
@@ -442,4 +443,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -448,4 +450,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox()
     {
@@ -461,4 +464,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/Use.java
===================================================================
--- trunk/src/com/kitfox/svg/Use.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/Use.java	(revision 11525)
@@ -66,4 +66,5 @@
     }
 
+    @Override
     public String getTagName()
     {
@@ -71,4 +72,5 @@
     }
 
+    @Override
     protected void build() throws SVGException
     {
@@ -109,4 +111,5 @@
     }
 
+    @Override
     public void render(Graphics2D g) throws SVGException
     {
@@ -134,4 +137,5 @@
     }
 
+    @Override
     public Shape getShape()
     {
@@ -148,4 +152,5 @@
     }
 
+    @Override
     public Rectangle2D getBoundingBox() throws SVGException
     {
@@ -174,4 +179,5 @@
      * update
      */
+    @Override
     public boolean updateTime(double curTime) throws SVGException
     {
Index: trunk/src/com/kitfox/svg/app/beans/SVGIcon.java
===================================================================
--- trunk/src/com/kitfox/svg/app/beans/SVGIcon.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/app/beans/SVGIcon.java	(revision 11525)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or 
+ * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above 
+ *   - Redistributions of source code must retain the above
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials 
+ *     disclaimer in the documentation and/or other materials
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE. 
- * 
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -37,8 +37,4 @@
 package com.kitfox.svg.app.beans;
 
-import com.kitfox.svg.SVGCache;
-import com.kitfox.svg.SVGDiagram;
-import com.kitfox.svg.SVGException;
-import com.kitfox.svg.SVGUniverse;
 import java.awt.Component;
 import java.awt.Dimension;
@@ -54,6 +50,11 @@
 import java.beans.PropertyChangeSupport;
 import java.net.URI;
+
 import javax.swing.ImageIcon;
 
+import com.kitfox.svg.SVGCache;
+import com.kitfox.svg.SVGDiagram;
+import com.kitfox.svg.SVGException;
+import com.kitfox.svg.SVGUniverse;
 
 /**
@@ -66,18 +67,18 @@
 
     public static final String PROP_AUTOSIZE = "PROP_AUTOSIZE";
-    
+
     private final PropertyChangeSupport changes = new PropertyChangeSupport(this);
-    
+
     SVGUniverse svgUniverse = SVGCache.getSVGUniverse();
     public static final int INTERP_NEAREST_NEIGHBOR = 0;
     public static final int INTERP_BILINEAR = 1;
     public static final int INTERP_BICUBIC = 2;
-    
+
     private boolean antiAlias;
     private int interpolation = INTERP_NEAREST_NEIGHBOR;
     private boolean clipToViewbox;
-    
+
     URI svgURI;
-    
+
 //    private boolean scaleToFit;
     AffineTransform scaleXform = new AffineTransform();
@@ -89,22 +90,23 @@
     public static final int AUTOSIZE_STRETCH = 4;
     private int autosize = AUTOSIZE_NONE;
-    
+
     Dimension preferredSize;
-    
+
     /** Creates a new instance of SVGIcon */
     public SVGIcon()
     {
     }
-    
+
     public void addPropertyChangeListener(PropertyChangeListener p)
     {
         changes.addPropertyChangeListener(p);
     }
-    
+
     public void removePropertyChangeListener(PropertyChangeListener p)
     {
         changes.removePropertyChangeListener(p);
     }
-    
+
+    @Override
     public Image getImage()
     {
@@ -117,13 +119,13 @@
      * @return height of this icon
      */
-    public int getIconHeight()
+    public int getIconHeightIgnoreAutosize()
     {
         if (preferredSize != null &&
-                (autosize == AUTOSIZE_VERT || autosize == AUTOSIZE_STRETCH 
+                (autosize == AUTOSIZE_VERT || autosize == AUTOSIZE_STRETCH
                 || autosize == AUTOSIZE_BESTFIT))
         {
             return preferredSize.height;
         }
-        
+
         SVGDiagram diagram = svgUniverse.getDiagram(svgURI);
         if (diagram == null)
@@ -133,17 +135,17 @@
         return (int)diagram.getHeight();
     }
-    
+
     /**
      * @return width of this icon
      */
-    public int getIconWidth()
+    public int getIconWidthIgnoreAutosize()
     {
         if (preferredSize != null &&
-                (autosize == AUTOSIZE_HORIZ || autosize == AUTOSIZE_STRETCH 
+                (autosize == AUTOSIZE_HORIZ || autosize == AUTOSIZE_STRETCH
                 || autosize == AUTOSIZE_BESTFIT))
         {
             return preferredSize.width;
         }
-        
+
         SVGDiagram diagram = svgUniverse.getDiagram(svgURI);
         if (diagram == null)
@@ -153,5 +155,47 @@
         return (int)diagram.getWidth();
     }
-    
+
+    private boolean isAutoSizeBestFitUseFixedHeight(final int iconWidthIgnoreAutosize, final int iconHeightIgnoreAutosize,
+            final SVGDiagram diagram)
+    {
+        return iconHeightIgnoreAutosize/diagram.getHeight() < iconWidthIgnoreAutosize/diagram.getWidth();
+    }
+
+    @Override
+    public int getIconWidth()
+    {
+        final int iconWidthIgnoreAutosize = getIconWidthIgnoreAutosize();
+        final int iconHeightIgnoreAutosize = getIconHeightIgnoreAutosize();
+        final SVGDiagram diagram = svgUniverse.getDiagram(svgURI);
+        if (preferredSize != null && (autosize == AUTOSIZE_VERT ||
+                                     (autosize == AUTOSIZE_BESTFIT && isAutoSizeBestFitUseFixedHeight(iconWidthIgnoreAutosize, iconHeightIgnoreAutosize, diagram))))
+        {
+            final double aspectRatio = diagram.getHeight()/diagram.getWidth();
+            return (int)(iconHeightIgnoreAutosize / aspectRatio);
+        }
+        else
+        {
+            return iconWidthIgnoreAutosize;
+        }
+    }
+
+    @Override
+    public int getIconHeight()
+    {
+        final int iconWidthIgnoreAutosize = getIconWidthIgnoreAutosize();
+        final int iconHeightIgnoreAutosize = getIconHeightIgnoreAutosize();
+        final SVGDiagram diagram = svgUniverse.getDiagram(svgURI);
+        if (preferredSize != null && (autosize == AUTOSIZE_HORIZ ||
+                                      (autosize == AUTOSIZE_BESTFIT && !isAutoSizeBestFitUseFixedHeight(iconWidthIgnoreAutosize, iconHeightIgnoreAutosize, diagram))))
+        {
+            final double aspectRatio = diagram.getHeight()/diagram.getWidth();
+            return (int)(iconWidthIgnoreAutosize * aspectRatio);
+        }
+        else
+        {
+            return iconHeightIgnoreAutosize;
+        }
+    }
+
     /**
      * Draws the icon to the specified component.
@@ -161,17 +205,18 @@
      * @param y - Y coordinate to draw icon
      */
+    @Override
     public void paintIcon(Component comp, Graphics gg, int x, int y)
     {
-        //Copy graphics object so that 
+        //Copy graphics object so that
         Graphics2D g = (Graphics2D)gg.create();
         paintIcon(comp, g, x, y);
         g.dispose();
     }
-    
+
     private void paintIcon(Component comp, Graphics2D g, int x, int y)
     {
         Object oldAliasHint = g.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
         g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antiAlias ? RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF);
-        
+
         Object oldInterpolationHint = g.getRenderingHint(RenderingHints.KEY_INTERPOLATION);
         switch (interpolation)
@@ -187,6 +232,6 @@
                 break;
         }
-        
-        
+
+
         SVGDiagram diagram = svgUniverse.getDiagram(svgURI);
         if (diagram == null)
@@ -194,5 +239,5 @@
             return;
         }
-        
+
         g.translate(x, y);
         diagram.setIgnoringClipHeuristic(!clipToViewbox);
@@ -201,6 +246,6 @@
             g.setClip(new Rectangle2D.Float(0, 0, diagram.getWidth(), diagram.getHeight()));
         }
-        
-        
+
+
         if (autosize == AUTOSIZE_NONE)
         {
@@ -217,15 +262,15 @@
             return;
         }
-        
-        final int width = getIconWidth();
-        final int height = getIconHeight();
+
+        final int width = getIconWidthIgnoreAutosize();
+        final int height = getIconHeightIgnoreAutosize();
 //        int width = getWidth();
 //        int height = getHeight();
-        
+
         if (width == 0 || height == 0)
         {
             return;
         }
-        
+
 //        if (width == 0 || height == 0)
 //        {
@@ -236,20 +281,20 @@
 //            return;
 //        }
-        
+
 //        g.setClip(0, 0, width, height);
-        
-        
+
+
 //        final Rectangle2D.Double rect = new Rectangle2D.Double();
 //        diagram.getViewRect(rect);
-//        
+//
 //        scaleXform.setToScale(width / rect.width, height / rect.height);
         double diaWidth = diagram.getWidth();
         double diaHeight = diagram.getHeight();
-        
+
         double scaleW = 1;
         double scaleH = 1;
         if (autosize == AUTOSIZE_BESTFIT)
         {
-            scaleW = scaleH = (height / diaHeight < width / diaWidth) 
+            scaleW = scaleH = (height / diaHeight < width / diaWidth)
                     ? height / diaHeight : width / diaWidth;
         }
@@ -268,8 +313,8 @@
         }
         scaleXform.setToScale(scaleW, scaleH);
-        
+
         AffineTransform oldXform = g.getTransform();
         g.transform(scaleXform);
-        
+
         try
         {
@@ -280,10 +325,10 @@
             throw new RuntimeException(e);
         }
-        
+
         g.setTransform(oldXform);
-        
-        
+
+
         g.translate(-x, -y);
-        
+
         g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, oldAliasHint);
         if (oldInterpolationHint != null)
@@ -292,5 +337,5 @@
         }
     }
-    
+
     /**
      * @return the universe this icon draws it's SVGDiagrams from
@@ -300,5 +345,5 @@
         return svgUniverse;
     }
-    
+
     public void setSvgUniverse(SVGUniverse svgUniverse)
     {
@@ -307,5 +352,5 @@
         changes.firePropertyChange("svgUniverse", old, svgUniverse);
     }
-    
+
     /**
      * @return the uni of the document being displayed by this icon
@@ -315,5 +360,5 @@
         return svgURI;
     }
-    
+
     /**
      * Loads an SVG document from a URI.
@@ -324,5 +369,5 @@
         URI old = this.svgURI;
         this.svgURI = svgURI;
-        
+
         SVGDiagram diagram = svgUniverse.getDiagram(svgURI);
         if (diagram != null)
@@ -335,8 +380,8 @@
             diagram.setDeviceViewport(new Rectangle(0, 0, size.width, size.height));
         }
-        
+
         changes.firePropertyChange("svgURI", old, svgURI);
     }
-    
+
     /**
      * Loads an SVG document from the classpath.  This function is equivilant to
@@ -347,10 +392,10 @@
     {
         URI old = this.svgURI;
-        
+
         try
         {
             svgURI = new URI(getClass().getResource(resourcePath).toString());
             changes.firePropertyChange("svgURI", old, svgURI);
-            
+
             SVGDiagram diagram = svgUniverse.getDiagram(svgURI);
             if (diagram != null)
@@ -358,5 +403,5 @@
                 diagram.setDeviceViewport(new Rectangle(0, 0, preferredSize.width, preferredSize.height));
             }
-            
+
         }
         catch (Exception e)
@@ -365,28 +410,5 @@
         }
     }
-    
-    /**
-     * If this SVG document has a viewbox, if scaleToFit is set, will scale the viewbox to match the
-     * preferred size of this icon
-     * @deprecated 
-     * @return 
-     */
-    public boolean isScaleToFit()
-    {
-        return autosize == AUTOSIZE_STRETCH;
-    }
-    
-    /**
-     * @deprecated 
-     * @return 
-     */
-    public void setScaleToFit(boolean scaleToFit)
-    {
-        setAutosize(AUTOSIZE_STRETCH);
-//        boolean old = this.scaleToFit;
-//        this.scaleToFit = scaleToFit;
-//        firePropertyChange("scaleToFit", old, scaleToFit);
-    }
-    
+
     public Dimension getPreferredSize()
     {
@@ -400,13 +422,13 @@
             }
         }
-        
+
         return new Dimension(preferredSize);
     }
-    
+
     public void setPreferredSize(Dimension preferredSize)
     {
         Dimension old = this.preferredSize;
         this.preferredSize = preferredSize;
-        
+
         SVGDiagram diagram = svgUniverse.getDiagram(svgURI);
         if (diagram != null)
@@ -414,29 +436,10 @@
             diagram.setDeviceViewport(new Rectangle(0, 0, preferredSize.width, preferredSize.height));
         }
-        
+
         changes.firePropertyChange("preferredSize", old, preferredSize);
     }
-    
-    
+
     /**
      * @return true if antiAliasing is turned on.
-     * @deprecated
-     */
-    public boolean getUseAntiAlias()
-    {
-        return getAntiAlias();
-    }
-    
-    /**
-     * @param antiAlias true to use antiAliasing.
-     * @deprecated
-     */
-    public void setUseAntiAlias(boolean antiAlias)
-    {
-        setAntiAlias(antiAlias);
-    }
-    
-    /**
-     * @return true if antiAliasing is turned on.
      */
     public boolean getAntiAlias()
@@ -444,5 +447,5 @@
         return antiAlias;
     }
-    
+
     /**
      * @param antiAlias true to use antiAliasing.
@@ -454,5 +457,5 @@
         changes.firePropertyChange("antiAlias", old, antiAlias);
     }
-    
+
     /**
      * @return interpolation used in rescaling images
@@ -462,5 +465,5 @@
         return interpolation;
     }
-    
+
     /**
      * @param interpolation Interpolation value used in rescaling images.
@@ -476,5 +479,5 @@
         changes.firePropertyChange("interpolation", old, interpolation);
     }
-    
+
     /**
      * clipToViewbox will set a clip box equivilant to the SVG's viewbox before
@@ -485,5 +488,5 @@
         return clipToViewbox;
     }
-    
+
     public void setClipToViewbox(boolean clipToViewbox)
     {
@@ -508,4 +511,4 @@
         changes.firePropertyChange(PROP_AUTOSIZE, oldAutosize, autosize);
     }
-        
+
 }
Index: trunk/src/com/kitfox/svg/app/data/Handler.java
===================================================================
--- trunk/src/com/kitfox/svg/app/data/Handler.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/app/data/Handler.java	(revision 11525)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or 
+ * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above 
+ *   - Redistributions of source code must retain the above
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials 
+ *     disclaimer in the documentation and/or other materials
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE. 
- * 
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -35,5 +35,4 @@
 package com.kitfox.svg.app.data;
 
-import com.kitfox.svg.SVGConst;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -45,4 +44,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
+
+import com.kitfox.svg.SVGConst;
 
 /**
@@ -78,9 +79,11 @@
             }
         }
-        
+
+        @Override
         public void connect() throws IOException
         {
         }
 
+        @Override
         public String getHeaderField(String name)
         {
@@ -93,4 +96,5 @@
         }
 
+        @Override
         public InputStream getInputStream() throws IOException
         {
@@ -104,4 +108,5 @@
     }
 
+    @Override
     protected URLConnection openConnection(URL u) throws IOException
     {
Index: trunk/src/com/kitfox/svg/pathcmd/Arc.java
===================================================================
--- trunk/src/com/kitfox/svg/pathcmd/Arc.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/pathcmd/Arc.java	(revision 11525)
@@ -77,4 +77,5 @@
 
 //    public void appendPath(ExtendedGeneralPath path, BuildHistory hist)
+    @Override
     public void appendPath(GeneralPath path, BuildHistory hist)
     {
@@ -91,4 +92,5 @@
     }
 
+    @Override
     public int getNumKnotsAdded()
     {
@@ -257,4 +259,5 @@
     }
 
+    @Override
     public String toString()
     {
Index: trunk/src/com/kitfox/svg/pathcmd/Cubic.java
===================================================================
--- trunk/src/com/kitfox/svg/pathcmd/Cubic.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/pathcmd/Cubic.java	(revision 11525)
@@ -57,4 +57,5 @@
     }
 
+    @Override
     public String toString()
     {
@@ -75,4 +76,5 @@
 
 //    public void appendPath(ExtendedGeneralPath path, BuildHistory hist)
+    @Override
     public void appendPath(GeneralPath path, BuildHistory hist)
     {
@@ -88,4 +90,5 @@
     }
 
+    @Override
     public int getNumKnotsAdded()
     {
Index: trunk/src/com/kitfox/svg/pathcmd/CubicSmooth.java
===================================================================
--- trunk/src/com/kitfox/svg/pathcmd/CubicSmooth.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/pathcmd/CubicSmooth.java	(revision 11525)
@@ -64,4 +64,5 @@
 
 //    public void appendPath(ExtendedGeneralPath path, BuildHistory hist)
+    @Override
     public void appendPath(GeneralPath path, BuildHistory hist)
     {
@@ -82,4 +83,5 @@
     }
     
+    @Override
     public int getNumKnotsAdded()
     {
@@ -87,4 +89,5 @@
     }
 
+    @Override
     public String toString()
     {
Index: trunk/src/com/kitfox/svg/pathcmd/Horizontal.java
===================================================================
--- trunk/src/com/kitfox/svg/pathcmd/Horizontal.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/pathcmd/Horizontal.java	(revision 11525)
@@ -52,4 +52,5 @@
     }
 
+    @Override
     public String toString()
     {
@@ -64,4 +65,5 @@
 
 //    public void appendPath(ExtendedGeneralPath path, BuildHistory hist)
+    @Override
     public void appendPath(GeneralPath path, BuildHistory hist)
     {
@@ -74,4 +76,5 @@
     }
     
+    @Override
     public int getNumKnotsAdded()
     {
Index: trunk/src/com/kitfox/svg/pathcmd/LineTo.java
===================================================================
--- trunk/src/com/kitfox/svg/pathcmd/LineTo.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/pathcmd/LineTo.java	(revision 11525)
@@ -61,4 +61,5 @@
 
 //    public void appendPath(ExtendedGeneralPath path, BuildHistory hist)
+    @Override
     public void appendPath(GeneralPath path, BuildHistory hist)
     {
@@ -71,4 +72,5 @@
     }
     
+    @Override
     public int getNumKnotsAdded()
     {
@@ -76,4 +78,5 @@
     }
 
+    @Override
     public String toString()
     {
Index: trunk/src/com/kitfox/svg/pathcmd/MoveTo.java
===================================================================
--- trunk/src/com/kitfox/svg/pathcmd/MoveTo.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/pathcmd/MoveTo.java	(revision 11525)
@@ -60,4 +60,5 @@
 
 //    public void appendPath(ExtendedGeneralPath path, BuildHistory hist)
+    @Override
     public void appendPath(GeneralPath path, BuildHistory hist)
     {
@@ -71,4 +72,5 @@
     }
 
+    @Override
     public int getNumKnotsAdded()
     {
@@ -76,4 +78,5 @@
     }
 
+    @Override
     public String toString()
     {
Index: trunk/src/com/kitfox/svg/pathcmd/Quadratic.java
===================================================================
--- trunk/src/com/kitfox/svg/pathcmd/Quadratic.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/pathcmd/Quadratic.java	(revision 11525)
@@ -55,4 +55,5 @@
     }
 
+    @Override
     public String toString()
     {
@@ -70,4 +71,5 @@
 
 //    public void appendPath(ExtendedGeneralPath path, BuildHistory hist)
+    @Override
     public void appendPath(GeneralPath path, BuildHistory hist)
     {
@@ -80,4 +82,5 @@
     }
 
+    @Override
     public int getNumKnotsAdded()
     {
Index: trunk/src/com/kitfox/svg/pathcmd/QuadraticSmooth.java
===================================================================
--- trunk/src/com/kitfox/svg/pathcmd/QuadraticSmooth.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/pathcmd/QuadraticSmooth.java	(revision 11525)
@@ -53,4 +53,5 @@
     }
 
+    @Override
     public String toString()
     {
@@ -65,4 +66,5 @@
 
 //    public void appendPath(ExtendedGeneralPath path, BuildHistory hist)
+    @Override
     public void appendPath(GeneralPath path, BuildHistory hist)
     {
@@ -83,4 +85,5 @@
     }
 
+    @Override
     public int getNumKnotsAdded()
     {
Index: trunk/src/com/kitfox/svg/pathcmd/Terminal.java
===================================================================
--- trunk/src/com/kitfox/svg/pathcmd/Terminal.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/pathcmd/Terminal.java	(revision 11525)
@@ -52,4 +52,5 @@
     }
 
+    @Override
     public String toString()
     {
@@ -59,4 +60,5 @@
 
 //    public void appendPath(ExtendedGeneralPath path, BuildHistory hist)
+    @Override
     public void appendPath(GeneralPath path, BuildHistory hist)
     {
@@ -66,4 +68,5 @@
     }
     
+    @Override
     public int getNumKnotsAdded()
     {
Index: trunk/src/com/kitfox/svg/pathcmd/Vertical.java
===================================================================
--- trunk/src/com/kitfox/svg/pathcmd/Vertical.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/pathcmd/Vertical.java	(revision 11525)
@@ -52,4 +52,5 @@
     }
 
+    @Override
     public String toString()
     {
@@ -63,4 +64,5 @@
 
 //    public void appendPath(ExtendedGeneralPath path, BuildHistory hist)
+    @Override
     public void appendPath(GeneralPath path, BuildHistory hist)
     {
@@ -73,4 +75,5 @@
     }
 
+    @Override
     public int getNumKnotsAdded()
     {
Index: trunk/src/com/kitfox/svg/util/FontSystem.java
===================================================================
--- trunk/src/com/kitfox/svg/util/FontSystem.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/util/FontSystem.java	(revision 11525)
@@ -56,5 +56,5 @@
     FontMetrics fm;
 
-    HashMap glyphCache = new HashMap();
+    HashMap<String, Glyph> glyphCache = new HashMap<String, Glyph>();
     
     public FontSystem(String fontFamily, int fontStyle, int fontWeight, int fontSize)
@@ -94,4 +94,5 @@
     }
 
+    @Override
     public MissingGlyph getGlyph(String unicode)
     {
Index: trunk/src/com/kitfox/svg/xml/ColorTable.java
===================================================================
--- trunk/src/com/kitfox/svg/xml/ColorTable.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/xml/ColorTable.java	(revision 11525)
@@ -49,7 +49,7 @@
 {
 
-    static final Map colorTable;
+    static final Map<String, Color> colorTable;
     static {
-        HashMap table = new HashMap();
+        HashMap<String, Color> table = new HashMap<>();
 
 	//We really should be interpreting the currentColor keyword as 
Index: trunk/src/com/kitfox/svg/xml/NumberWithUnits.java
===================================================================
--- trunk/src/com/kitfox/svg/xml/NumberWithUnits.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/xml/NumberWithUnits.java	(revision 11525)
@@ -123,4 +123,5 @@
     }
 
+    @Override
     public String toString()
     {
@@ -128,4 +129,5 @@
     }
 
+    @Override
     public boolean equals(Object obj)
     {
@@ -146,4 +148,5 @@
     }
 
+    @Override
     public int hashCode()
     {
Index: trunk/src/com/kitfox/svg/xml/ReadableXMLElement.java
===================================================================
--- trunk/src/com/kitfox/svg/xml/ReadableXMLElement.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/xml/ReadableXMLElement.java	(revision 11525)
@@ -39,6 +39,4 @@
 import org.w3c.dom.*;
 import java.net.*;
-import java.util.*;
-import java.lang.reflect.*;
 
 /**
Index: trunk/src/com/kitfox/svg/xml/StyleSheet.java
===================================================================
--- trunk/src/com/kitfox/svg/xml/StyleSheet.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/xml/StyleSheet.java	(revision 11525)
@@ -16,5 +16,5 @@
 public class StyleSheet
 {
-    HashMap ruleMap = new HashMap();
+    HashMap<StyleSheetRule, String> ruleMap = new HashMap<>();
 
     public static StyleSheet parseSheet(String src)
Index: trunk/src/com/kitfox/svg/xml/StyleSheetRule.java
===================================================================
--- trunk/src/com/kitfox/svg/xml/StyleSheetRule.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/xml/StyleSheetRule.java	(revision 11525)
@@ -22,4 +22,5 @@
     }
 
+    @Override
     public int hashCode()
     {
@@ -31,4 +32,5 @@
     }
 
+    @Override
     public boolean equals(Object obj)
     {
Index: trunk/src/com/kitfox/svg/xml/WritableXMLElement.java
===================================================================
--- trunk/src/com/kitfox/svg/xml/WritableXMLElement.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/xml/WritableXMLElement.java	(revision 11525)
@@ -37,9 +37,4 @@
 package com.kitfox.svg.xml;
 
-import org.w3c.dom.*;
-import java.net.*;
-import java.util.*;
-import java.lang.reflect.*;
-
 /**
  * @author Mark McKay
Index: trunk/src/com/kitfox/svg/xml/XMLParseUtil.java
===================================================================
--- trunk/src/com/kitfox/svg/xml/XMLParseUtil.java	(revision 11524)
+++ trunk/src/com/kitfox/svg/xml/XMLParseUtil.java	(revision 11525)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or 
+ * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above 
+ *   - Redistributions of source code must retain the above
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials 
+ *     disclaimer in the documentation and/or other materials
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE. 
- * 
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -37,10 +37,14 @@
 package com.kitfox.svg.xml;
 
-import com.kitfox.svg.SVGConst;
-import java.awt.*;
-import java.util.*;
-import java.util.regex.*;
+import java.awt.Toolkit;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.kitfox.svg.SVGConst;
 
 /**
@@ -63,5 +67,5 @@
         matchWs.reset(list);
 
-        LinkedList matchList = new LinkedList();
+        LinkedList<String> matchList = new LinkedList<>();
         while (matchWs.find())
         {
@@ -70,19 +74,9 @@
 
         String[] retArr = new String[matchList.size()];
-        return (String[])matchList.toArray(retArr);
+        return matchList.toArray(retArr);
     }
 
     public static double parseDouble(String val)
     {
-        /*
-        if (val == null) return 0.0;
-
-        double retVal = 0.0;
-        try
-        { retVal = Double.parseDouble(val); }
-        catch (Exception e)
-        {}
-        return retVal;
-         */
         return findDouble(val);
     }
@@ -103,5 +97,5 @@
         catch (StringIndexOutOfBoundsException e)
         {
-            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, 
+            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING,
                 "XMLParseUtil: regex parse problem: '" + val + "'", e);
         }
@@ -112,10 +106,10 @@
         double retVal = 0;
         try
-        { 
-            retVal = Double.parseDouble(val); 
-            
+        {
+            retVal = Double.parseDouble(val);
+
             float pixPerInch;
             try {
-                pixPerInch = (float)Toolkit.getDefaultToolkit().getScreenResolution();
+                pixPerInch = Toolkit.getDefaultToolkit().getScreenResolution();
             }
             catch (NoClassDefFoundError err)
@@ -126,5 +120,5 @@
             final float inchesPerCm = .3936f;
             final String units = fpMatch.group(6);
-            
+
             if ("%".equals(units)) retVal /= 100;
             else if ("in".equals(units))
@@ -166,5 +160,5 @@
         fpMatch.reset(list);
 
-        LinkedList doubList = new LinkedList();
+        LinkedList<Double> doubList = new LinkedList<>();
         while (fpMatch.find())
         {
@@ -174,9 +168,9 @@
 
         double[] retArr = new double[doubList.size()];
-        Iterator it = doubList.iterator();
+        Iterator<Double> it = doubList.iterator();
         int idx = 0;
         while (it.hasNext())
         {
-            retArr[idx++] = ((Double)it.next()).doubleValue();
+            retArr[idx++] = it.next().doubleValue();
         }
 
@@ -216,5 +210,5 @@
         fpMatch.reset(list);
 
-        LinkedList floatList = new LinkedList();
+        LinkedList<Float> floatList = new LinkedList<>();
         while (fpMatch.find())
         {
@@ -224,9 +218,9 @@
 
         float[] retArr = new float[floatList.size()];
-        Iterator it = floatList.iterator();
+        Iterator<Float> it = floatList.iterator();
         int idx = 0;
         while (it.hasNext())
         {
-            retArr[idx++] = ((Float)it.next()).floatValue();
+            retArr[idx++] = it.next().floatValue();
         }
 
@@ -261,5 +255,5 @@
         intMatch.reset(list);
 
-        LinkedList intList = new LinkedList();
+        LinkedList<Integer> intList = new LinkedList<>();
         while (intMatch.find())
         {
@@ -269,9 +263,9 @@
 
         int[] retArr = new int[intList.size()];
-        Iterator it = intList.iterator();
+        Iterator<Integer> it = intList.iterator();
         int idx = 0;
         while (it.hasNext())
         {
-            retArr[idx++] = ((Integer)it.next()).intValue();
+            retArr[idx++] = it.next().intValue();
         }
 
@@ -307,5 +301,5 @@
      * @param map - A map to which these styles will be added
      */
-    public static HashMap parseStyle(String styleString, HashMap map) {
+    public static HashMap<String, StyleAttribute> parseStyle(String styleString, HashMap<String, StyleAttribute> map) {
         final Pattern patSemi = Pattern.compile(";");
 
