Package javax.swing.plaf

Examples of javax.swing.plaf.FontUIResource


        addColor(d, "desktop", "nimbusBase", -0.009207249f, -0.13984653f, -0.07450983f, 0);
        addColor(d, "activeCaption", "nimbusBlueGrey", 0.0f, -0.049920253f, 0.031372547f, 0);
        addColor(d, "inactiveCaption", "nimbusBlueGrey", -0.00505054f, -0.055526316f, 0.039215684f, 0);

        //Font palette
        d.put("defaultFont", new FontUIResource(defaultFont));
        d.put("InternalFrame.titleFont", new DerivedFont("defaultFont", 1.0f, true, null));

        //Border palette

        //The global style definition
View Full Code Here


     */
    private SynthStyle getDefaultStyle() {
        if (_defaultStyle == null) {
            _defaultStyle = new DefaultSynthStyle();
            ((DefaultSynthStyle)_defaultStyle).setFont(
                new FontUIResource(Font.DIALOG, Font.PLAIN,12));
        }
        return _defaultStyle;
    }
View Full Code Here

        if (FontManager.mapFcName(fcFamilyLC) != null) {
            /* family is a Fc/Pango logical font which we need to expand. */
           return FontManager.getFontConfigFUIR(fcFamilyLC, style, size);
        } else {
            /* It's a physical font which we will create with a fallback */
            Font font = new FontUIResource(family, style, size);
            return FontManager.getCompositeFontUIResource(font);
        }
    }
View Full Code Here

        addColor(d, "desktop", "nimbusBase", -0.009207249f, -0.13984653f, -0.07450983f, 0);
        addColor(d, "activeCaption", "nimbusBlueGrey", 0.0f, -0.049920253f, 0.031372547f, 0);
        addColor(d, "inactiveCaption", "nimbusBlueGrey", -0.00505054f, -0.055526316f, 0.039215684f, 0);

        //Font palette
        d.put("defaultFont", new FontUIResource(defaultFont));
        d.put("InternalFrame.titleFont", new DerivedFont("defaultFont", 1.0f, true, null));

        //Border palette

        //The global style definition
View Full Code Here

                throw new SAXException("You must define a name for the font");
            }
            if (size == 0) {
                throw new SAXException("You must define a size for the font");
            }
            font = new FontUIResource(name, style, size);
        }
        else if (name != null || size != 0 || style != Font.PLAIN) {
            throw new SAXException("Name, size and style are not for use " +
                                   "with idref");
        }
View Full Code Here

     */
    private SynthStyle getDefaultStyle() {
        if (_defaultStyle == null) {
            _defaultStyle = new DefaultSynthStyle();
            ((DefaultSynthStyle)_defaultStyle).setFont(
                new FontUIResource(Font.DIALOG, Font.PLAIN,12));
        }
        return _defaultStyle;
    }
View Full Code Here

        super.setUp();
        ui = new MyBasicRadioButtonUI();
    }

    public void testGetPreferredSize() {
        Font font = new FontUIResource(new Font("serif", Font.PLAIN, 24));
        UIManager.put("RadioButton.font", font);
        Border border = new BorderUIResource(BorderFactory.createEmptyBorder(11, 11, 11, 11));
        UIManager.put("RadioButton.border", border);
        JRadioButton button1 = new JRadioButton();
        JRadioButton button2 = new JRadioButton("text");
View Full Code Here

    public void testUninstallDefaults() {
        JRadioButton button = new JRadioButton();
        UIManager.put("RadioButton.foreground", new ColorUIResource(Color.cyan));
        UIManager.put("RadioButton.background", new ColorUIResource(Color.blue));
        assertNotNull("font is installed", button.getFont());
        Font font = new FontUIResource(button.getFont().deriveFont(100f));
        UIManager.put("RadioButton.font", font);
        Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
        UIManager.put("RadioButton.border", border);
        Insets margin = new InsetsUIResource(10, 20, 30, 40);
        UIManager.put("RadioButton.margin", margin);
View Full Code Here

    public void testInstallDefaults() {
        JRadioButton button = new JRadioButton();
        UIManager.put("RadioButton.foreground", new ColorUIResource(Color.cyan));
        UIManager.put("RadioButton.background", new ColorUIResource(Color.blue));
        assertNotNull("font is installed", button.getFont());
        Font font = new FontUIResource(button.getFont().deriveFont(100f));
        UIManager.put("RadioButton.font", font);
        Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
        UIManager.put("RadioButton.border", border);
        Insets margin = new InsetsUIResource(10, 20, 30, 40);
        UIManager.put("RadioButton.margin", margin);
View Full Code Here

     */
    public void testInstallUninstallDefaults() {
        JPopupMenu menu = new JPopupMenu();
        UIManager.getDefaults().put("PopupMenu.background", new ColorUIResource(Color.red));
        UIManager.getDefaults().put("PopupMenu.foreground", new ColorUIResource(Color.yellow));
        Font font = new FontUIResource(menu.getFont().deriveFont(100f));
        UIManager.getDefaults().put("PopupMenu.font", font);
        Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
        UIManager.getDefaults().put("PopupMenu.border", border);
        menu.setUI(basicPopupUI);
        basicPopupUI.installDefaults();
View Full Code Here

TOP

Related Classes of javax.swing.plaf.FontUIResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.