Java 类javax.swing.UIDefaults.ProxyLazyValue 实例源码

项目:perfload-loadprofiles    文件:SwingUtils.java   
/**
 * Sets the default UI font style.
 * 
 * @param fontStyle
 *            The font style
 * @see Font See Font Javadoc for possible styles
 */
public static void setUIFontStyle(final int fontStyle) {
    for (Enumeration<?> en = UIManager.getDefaults().keys(); en.hasMoreElements();) {
        Object key = en.nextElement();
        Object value = UIManager.get(key);
        if (value instanceof FontUIResource) {
            FontUIResource fontRes = (FontUIResource) value;
            UIManager.put(key, new ProxyLazyValue("javax.swing.plaf.FontUIResource", null, new Object[] { fontRes.getName(),
                    fontStyle, fontRes.getSize() }));
        }
    }
}
项目:cn1    文件:BasicLookAndFeel.java   
private static ProxyLazyValue lazyValueForFont(final String fontName, final int style, final int size) {
    return new UIDefaults.ProxyLazyValue("javax.swing.plaf.FontUIResource",
                                         new Object[] {fontName, new Integer(style), new Integer(size)});
}
项目:freeVM    文件:BasicLookAndFeel.java   
private static ProxyLazyValue lazyValueForFont(final String fontName, final int style, final int size) {
    return new UIDefaults.ProxyLazyValue("javax.swing.plaf.FontUIResource",
                                         new Object[] {fontName, new Integer(style), new Integer(size)});
}
项目:freeVM    文件:BasicLookAndFeel.java   
private static ProxyLazyValue lazyValueForFont(final String fontName, final int style, final int size) {
    return new UIDefaults.ProxyLazyValue("javax.swing.plaf.FontUIResource",
                                         new Object[] {fontName, new Integer(style), new Integer(size)});
}