src/macosx/classes/com/apple/laf/AquaImageFactory.java
Print this page
@@ -44,22 +44,20 @@
import com.apple.laf.AquaIcon.InvertableIcon;
import com.apple.laf.AquaIcon.JRSUIControlSpec;
import com.apple.laf.AquaIcon.SystemIcon;
import com.apple.laf.AquaUtils.RecyclableObject;
import com.apple.laf.AquaUtils.RecyclableSingleton;
-import java.util.Arrays;
-import java.util.List;
import sun.awt.image.MultiResolutionBufferedImage;
import sun.awt.image.MultiResolutionImage;
public class AquaImageFactory {
public static IconUIResource getConfirmImageIcon() {
// public, because UIDefaults.ProxyLazyValue uses reflection to get this value
return new IconUIResource(new AquaIcon.CachingScalingIcon(kAlertIconSize, kAlertIconSize) {
Image createImage() {
- return getThisApplicationsIcon(kAlertIconSize, kAlertIconSize);
+ return getGenericJavaIcon();
}
});
}
public static IconUIResource getCautionImageIcon() {
@@ -81,28 +79,10 @@
final Image lockIcon = Toolkit.getDefaultToolkit().getImage("NSImage://NSSecurity");
return getAppIconCompositedOn(lockIcon);
}
- static Image getThisApplicationsIcon(final int width, final int height) {
- final String path = getPathToThisApplication();
-
- if (path == null) {
- return getGenericJavaIcon();
- }
-
- if (path.endsWith("/Home/bin")) {
- return getGenericJavaIcon();
- }
-
- if (path.startsWith("/usr/bin")) {
- return getGenericJavaIcon();
- }
-
- return AquaUtils.getCImageCreator().createImageOfFile(path, height, width);
- }
-
static Image getGenericJavaIcon() {
return java.security.AccessController.doPrivileged(new PrivilegedAction<Image>() {
public Image run() {
return com.apple.eawt.Application.getApplication().getDockIconImage();
}
@@ -142,11 +122,11 @@
final int kAlertSubIconSize = (int) (scaledAlertIconSize * 0.5);
final int kAlertSubIconInset = scaledAlertIconSize - kAlertSubIconSize;
final Icon smallAppIconScaled = new AquaIcon.CachingScalingIcon(
kAlertSubIconSize, kAlertSubIconSize) {
Image createImage() {
- return getThisApplicationsIcon(kAlertSubIconSize, kAlertSubIconSize);
+ return getGenericJavaIcon();
}
};
final BufferedImage image = new BufferedImage(scaledAlertIconSize,
scaledAlertIconSize, BufferedImage.TYPE_INT_ARGB);