Skip to content

Commit

Permalink
Removed old commented-out code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Luc Paour committed Sep 21, 2002
1 parent ae46943 commit 570073d
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions com/gallery/GalleryRemote/PreviewFrame.java
Expand Up @@ -95,9 +95,6 @@ public ImageIcon getSizedIconForce(String filename) {

if (r == null)
{
/*r = safeNewImageIcon(filename);
Dimension d = getSizeKeepRatio(new Dimension(r.getIconWidth(), r.getIconHeight()), getRootPane().getSize());
r.setImage(safeGetScaledInstance(r.getImage(), d.width, d.height, Image.SCALE_FAST));*/
r = ImageUtils.load(
filename,
getRootPane().getSize(),
Expand Down Expand Up @@ -150,48 +147,6 @@ public void loadPreview(String filename)
}
}

/*public ImageIcon safeNewImageIcon(String filename)
{
Log.log(Log.TRACE, MODULE, "safeNewImageIcon " + filename);
Log.log(Log.TRACE, MODULE, Runtime.getRuntime().freeMemory() + " - " + Runtime.getRuntime().totalMemory());
try
{
return new ImageIcon(filename);
}
catch (OutOfMemoryError e)
{
Log.log(Log.ERROR, MODULE, "Caught out of memory error in safeNewImageIcon");
imageIcons.shrink();
return safeNewImageIcon(filename);
}
finally
{
Log.log(Log.TRACE, MODULE, Runtime.getRuntime().freeMemory() + " - " + Runtime.getRuntime().totalMemory());
}
}
public Image safeGetScaledInstance(Image image, int width, int height, int mode)
{
Log.log(Log.TRACE, MODULE, "safeGetScaledInstance");
Log.log(Log.TRACE, MODULE, Runtime.getRuntime().freeMemory() + " - " + Runtime.getRuntime().totalMemory());
try
{
Image result = image.getScaledInstance(width, height, mode);
image.flush();
return result;
}
catch (OutOfMemoryError e)
{
Log.log(Log.ERROR, MODULE, "Caught out of memory error in safeGetScaledInstance");
imageIcons.shrink();
return safeGetScaledInstance(image, width, height, mode);
}
finally
{
Log.log(Log.TRACE, MODULE, Runtime.getRuntime().freeMemory() + " - " + Runtime.getRuntime().totalMemory());
}
}*/


public class SmartHashtable extends Hashtable
{
Expand Down

0 comments on commit 570073d

Please sign in to comment.