]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/gui/PhotoThumbnail.java
Version 7, February 2009
[GpsPrune.git] / tim / prune / gui / PhotoThumbnail.java
index b792a66f55b6b70ff820a8d539739fa51c096787..2ad22fa3a36e00be8979a2b23281490211e7618f 100644 (file)
@@ -21,7 +21,8 @@ public class PhotoThumbnail extends JPanel implements Runnable
        private int _lastWidth = -1;
        private int _lastHeight = -1;
        private boolean _loadingImage = false;
-       private static String _loadingString = null;
+       /** String to show before photo is loaded */
+       private static final String _loadingString = I18nManager.getText("details.photo.loading") + " ...";
 
 
        /**
@@ -31,7 +32,6 @@ public class PhotoThumbnail extends JPanel implements Runnable
        {
                // TODO: Make size of thumbnail dynamic, as big as it can be
                setOpaque(true);
-               _loadingString = I18nManager.getText("details.photo.loading") + " ...";
        }
 
 
@@ -105,10 +105,8 @@ public class PhotoThumbnail extends JPanel implements Runnable
                        if (picWidth > -1 && picHeight > -1)
                        {
                                int displayWidth = Math.min(getWidth(), getParent().getWidth());
-                               // System.out.println("width = " + getWidth() + ", " + getParent().getWidth() + " = " + displayWidth);
                                int displayHeight = Math.min(getHeight(), getParent().getHeight());
-                               // System.out.println("height = " + getHeight() + ", " + getParent().getHeight() + " = " + displayHeight);
-       
+
                                // calculate maximum thumbnail size
                                Dimension thumbSize = ImageUtils.getThumbnailSize(picWidth, picHeight, displayWidth, displayHeight);
                                // Work out if need to remake image