Java 类sun.awt.IconInfo 实例源码

项目:OpenJSharp    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:OpenJSharp    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    for (int i = 0; i < cnt; i++) {
        ComponentPeer childPeer = children[i].getPeer();
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:OpenJSharp    文件:XWindowPeer.java   
protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:jdk8u-jdk    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:jdk8u-jdk    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    for (int i = 0; i < cnt; i++) {
        ComponentPeer childPeer = children[i].getPeer();
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:jdk8u-jdk    文件:XWindowPeer.java   
protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:openjdk-jdk10    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
    for (int i = 0; i < cnt; i++) {
        final ComponentPeer childPeer = acc.getPeer(children[i]);
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:openjdk-jdk10    文件:XWindowPeer.java   
protected static synchronized java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:openjdk-jdk10    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:openjdk9    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
    for (int i = 0; i < cnt; i++) {
        final ComponentPeer childPeer = acc.getPeer(children[i]);
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:openjdk9    文件:XWindowPeer.java   
protected static synchronized java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:openjdk9    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:jdk8u_jdk    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:jdk8u_jdk    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    for (int i = 0; i < cnt; i++) {
        ComponentPeer childPeer = children[i].getPeer();
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:jdk8u_jdk    文件:XWindowPeer.java   
protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:lookaside_java-1.8.0-openjdk    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:lookaside_java-1.8.0-openjdk    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    for (int i = 0; i < cnt; i++) {
        ComponentPeer childPeer = children[i].getPeer();
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:XWindowPeer.java   
protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:infobip-open-jdk-8    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:infobip-open-jdk-8    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    for (int i = 0; i < cnt; i++) {
        ComponentPeer childPeer = children[i].getPeer();
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:infobip-open-jdk-8    文件:XWindowPeer.java   
protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:jdk8u-dev-jdk    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:jdk8u-dev-jdk    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    for (int i = 0; i < cnt; i++) {
        ComponentPeer childPeer = children[i].getPeer();
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:jdk8u-dev-jdk    文件:XWindowPeer.java   
protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:OLD-OpenJDK8    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:OLD-OpenJDK8    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    for (int i = 0; i < cnt; i++) {
        ComponentPeer childPeer = children[i].getPeer();
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:OLD-OpenJDK8    文件:XWindowPeer.java   
protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:openjdk-jdk7u-jdk    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:openjdk-jdk7u-jdk    文件:XIconWindow.java   
/**
 * Sets icon image by selecting one of the images from the list.
 * The selected image is the one having the best matching size.
 */
void setIconImages(java.util.List<IconInfo> icons) {
    if (icons == null || icons.size() == 0) return;

    int minDiff = Integer.MAX_VALUE;
    Image min = null;
    for (IconInfo iconInfo : icons) {
        if (iconInfo.isValid()) {
            Image image = iconInfo.getImage();
            Dimension dim = calcIconSize(image.getWidth(null), image.getHeight(null));
            int widthDiff = Math.abs(dim.width - image.getWidth(null));
            int heightDiff = Math.abs(image.getHeight(null) - dim.height);

            // "=" below allows to select the best matching icon
            if (minDiff >= (widthDiff + heightDiff)) {
                minDiff = (widthDiff + heightDiff);
                min = image;
            }
        }
    }
    if (min != null) {
        log.finer("Icon: {0}x{1}", min.getWidth(null), min.getHeight(null));
        setIconImage(min);
    }
}
项目:openjdk-jdk7u-jdk    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    for (int i = 0; i < cnt; i++) {
        ComponentPeer childPeer = children[i].getPeer();
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:openjdk-jdk7u-jdk    文件:XWindowPeer.java   
protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:openjdk-icedtea7    文件:CWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (CWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
            icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
            icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
            icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
            icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
            icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
            icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
            icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
            icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
            icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
            icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
            icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:openjdk-icedtea7    文件:XIconWindow.java   
/**
 * Sets icon image by selecting one of the images from the list.
 * The selected image is the one having the best matching size.
 */
void setIconImages(java.util.List<IconInfo> icons) {
    if (icons == null || icons.size() == 0) return;

    int minDiff = Integer.MAX_VALUE;
    Image min = null;
    for (IconInfo iconInfo : icons) {
        if (iconInfo.isValid()) {
            Image image = iconInfo.getImage();
            Dimension dim = calcIconSize(image.getWidth(null), image.getHeight(null));
            int widthDiff = Math.abs(dim.width - image.getWidth(null));
            int heightDiff = Math.abs(image.getHeight(null) - dim.height);

            // "=" below allows to select the best matching icon
            if (minDiff >= (widthDiff + heightDiff)) {
                minDiff = (widthDiff + heightDiff);
                min = image;
            }
        }
    }
    if (min != null) {
        log.finer("Icon: {0}x{1}", min.getWidth(null), min.getHeight(null));
        setIconImage(min);
    }
}
项目:openjdk-icedtea7    文件:XWindowPeer.java   
public void recursivelySetIcon(java.util.List<IconInfo> icons) {
    dumpIcons(winAttr.icons);
    setIconHints(icons);
    Window target = (Window)this.target;
    Window[] children = target.getOwnedWindows();
    int cnt = children.length;
    for (int i = 0; i < cnt; i++) {
        ComponentPeer childPeer = children[i].getPeer();
        if (childPeer != null && childPeer instanceof XWindowPeer) {
            if (((XWindowPeer)childPeer).winAttr.iconsInherited) {
                ((XWindowPeer)childPeer).winAttr.icons = icons;
                ((XWindowPeer)childPeer).recursivelySetIcon(icons);
            }
        }
    }
}
项目:openjdk-icedtea7    文件:XWindowPeer.java   
protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
    if (defaultIconInfo == null) {
        defaultIconInfo = new ArrayList<IconInfo>();
        if (XlibWrapper.dataModel == 32) {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon32_java_icon48_png.java_icon48_png));
        } else {
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon16_png.java_icon16_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon24_png.java_icon24_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon32_png.java_icon32_png));
            defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
        }
    }
    return defaultIconInfo;
}
项目:OpenJSharp    文件:CWarningWindow.java   
private void updateIconSize() {
    int newSize = -1;

    if (ownerWindow != null) {
        Insets insets = ownerWindow.getInsets();
        int max = Math.max(insets.top, Math.max(insets.bottom,
                Math.max(insets.left, insets.right)));
        if (max < 24) {
            newSize = 0;
        } else if (max < 32) {
            newSize = 1;
        } else if (max < 48) {
            newSize = 2;
        } else {
            newSize = 3;
        }
    }
    // Make sure we have a valid size
    if (newSize == -1) {
        newSize = 0;
    }

    synchronized (lock) {
        if (newSize != currentSize) {
            currentSize = newSize;
            IconInfo ico = getSecurityIconInfo(currentSize, 0);
            AWTAccessor.getWindowAccessor().setSecurityWarningSize(
                ownerWindow, ico.getWidth(), ico.getHeight());
        }
    }
}
项目:OpenJSharp    文件:XDecoratedPeer.java   
void setIconHints(java.util.List<IconInfo> icons) {
    if (!XWM.getWM().setNetWMIcon(this, icons)) {
        if (icons.size() > 0) {
            if (iconWindow == null) {
                iconWindow = new XIconWindow(this);
            }
            iconWindow.setIconImages(icons);
        }
    }
}
项目:OpenJSharp    文件:XWarningWindow.java   
private static IconInfo getSecurityIconInfo(int size, int num) {
    synchronized (XWarningWindow.class) {
        if (icons == null) {
            icons = new IconInfo[4][3];
            if (XlibWrapper.dataModel == 32) {
                icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
                icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
                icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
                icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
                icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
                icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
                icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
                icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
                icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
                icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
                icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
                icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
            } else {
                icons[0][0] = new IconInfo(sun.awt.AWTIcon64_security_icon_bw16_png.security_icon_bw16_png);
                icons[0][1] = new IconInfo(sun.awt.AWTIcon64_security_icon_interim16_png.security_icon_interim16_png);
                icons[0][2] = new IconInfo(sun.awt.AWTIcon64_security_icon_yellow16_png.security_icon_yellow16_png);
                icons[1][0] = new IconInfo(sun.awt.AWTIcon64_security_icon_bw24_png.security_icon_bw24_png);
                icons[1][1] = new IconInfo(sun.awt.AWTIcon64_security_icon_interim24_png.security_icon_interim24_png);
                icons[1][2] = new IconInfo(sun.awt.AWTIcon64_security_icon_yellow24_png.security_icon_yellow24_png);
                icons[2][0] = new IconInfo(sun.awt.AWTIcon64_security_icon_bw32_png.security_icon_bw32_png);
                icons[2][1] = new IconInfo(sun.awt.AWTIcon64_security_icon_interim32_png.security_icon_interim32_png);
                icons[2][2] = new IconInfo(sun.awt.AWTIcon64_security_icon_yellow32_png.security_icon_yellow32_png);
                icons[3][0] = new IconInfo(sun.awt.AWTIcon64_security_icon_bw48_png.security_icon_bw48_png);
                icons[3][1] = new IconInfo(sun.awt.AWTIcon64_security_icon_interim48_png.security_icon_interim48_png);
                icons[3][2] = new IconInfo(sun.awt.AWTIcon64_security_icon_yellow48_png.security_icon_yellow48_png);
            }
        }
    }
    final int sizeIndex = size % icons.length;
    return icons[sizeIndex][num % icons[sizeIndex].length];
}
项目:OpenJSharp    文件:XIconWindow.java   
/**
 * Sets icon image by selecting one of the images from the list.
 * The selected image is the one having the best matching size.
 */
void setIconImages(java.util.List<IconInfo> icons) {
    if (icons == null || icons.size() == 0) return;

    int minDiff = Integer.MAX_VALUE;
    Image min = null;
    for (IconInfo iconInfo : icons) {
        if (iconInfo.isValid()) {
            Image image = iconInfo.getImage();
            Dimension dim = calcIconSize(image.getWidth(null), image.getHeight(null));
            int widthDiff = Math.abs(dim.width - image.getWidth(null));
            int heightDiff = Math.abs(image.getHeight(null) - dim.height);

            // "=" below allows to select the best matching icon
            if (minDiff >= (widthDiff + heightDiff)) {
                minDiff = (widthDiff + heightDiff);
                min = image;
            }
        }
    }
    if (min != null) {
        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("Icon: {0}x{1}", min.getWidth(null), min.getHeight(null));
        }
        setIconImage(min);
    }
}
项目:OpenJSharp    文件:XWindowPeer.java   
static void dumpIcons(java.util.List<IconInfo> icons) {
    if (iconLog.isLoggable(PlatformLogger.Level.FINEST)) {
        iconLog.finest(">>> Sizes of icon images:");
        for (Iterator<IconInfo> i = icons.iterator(); i.hasNext(); ) {
            iconLog.finest("    {0}", i.next());
        }
    }
}