< prev index next >
src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java
Print this page
@@ -124,13 +124,13 @@
final int size = (int) Math.sqrt(iconBits.length);
final BufferedImage img =
new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
img.setRGB(0, 0, size, size, iconBits, 0, size);
- STANDARD_VIEW_BUTTONS[iconIndex] = (size == 16)
+ STANDARD_VIEW_BUTTONS[iconIndex] = (size == SMALL_ICON_SIZE)
? img
- : new MultiResolutionIconImage(16, img);
+ : new MultiResolutionIconImage(SMALL_ICON_SIZE, img);
}
return STANDARD_VIEW_BUTTONS[iconIndex];
}
@@ -377,11 +377,12 @@
} else if (key.startsWith("shell32Icon ") || key.startsWith("shell32LargeIcon ")) {
String name = key.substring(key.indexOf(" ") + 1);
try {
int i = Integer.parseInt(name);
if (i >= 0) {
- return Win32ShellFolder2.getShell32Icon(i, key.startsWith("shell32LargeIcon "));
+ return Win32ShellFolder2.getShell32Icon(i, key.startsWith("shell32LargeIcon ")?
+ LARGE_ICON_SIZE : SMALL_ICON_SIZE);
}
} catch (NumberFormatException ex) {
}
}
return null;
< prev index next >