Package javax.swing.plaf

Examples of javax.swing.plaf.BorderUIResource$EmptyBorderUIResource


            @Override
            public FontMetrics getFontMetrics(Font font) {
                return BasicMenuItemUITest.this.getFontMetrics(font);
            }
        };
        Border border = new BorderUIResource(BorderFactory.createEmptyBorder(1, 1, 1, 1));
        UIManager.put(prefix + "border", border);
        Insets margin = new InsetsUIResource(1, 2, 3, 4);
        UIManager.put("OptionPane.margin", margin);
        menuItemUI = new BasicMenuItemUI();
        item.setUI(menuItemUI);
View Full Code Here


                new ColorUIResource(Color.pink));
        UIManager.getDefaults().put(prefix + "disabledForeground",
                new ColorUIResource(Color.orange));
        Font font = new FontUIResource(item.getFont().deriveFont(100f));
        UIManager.getDefaults().put(prefix + "font", font);
        Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
        UIManager.getDefaults().put(prefix + "border", border);
        Insets margin = new InsetsUIResource(1, 2, 3, 4);
        UIManager.getDefaults().put(prefix + "margin", margin);
        Icon arrow = new ImageIcon(new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB));
        UIManager.getDefaults().put(prefix + "arrowIcon", arrow);
View Full Code Here

            @Override
            public FontMetrics getFontMetrics(Font font) {
                return Toolkit.getDefaultToolkit().getFontMetrics(font);
            }
        };
        Border border = new BorderUIResource(BorderFactory.createEmptyBorder(10, 20, 30, 40));
        UIManager.put("MenuItem.border", border);
        Insets margin = new InsetsUIResource(1, 2, 3, 4);
        UIManager.put("OptionPane.margin", margin);
        menuItemUI = new BasicMenuItemUI();
        item.setUI(menuItemUI);
View Full Code Here

        UIManager.put("RadioButton.select", new ColorUIResource(Color.green));
        UIManager.put("RadioButton.foreground", new ColorUIResource(Color.cyan));
        UIManager.put("RadioButton.background", new ColorUIResource(Color.blue));
        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);
        Icon icon = new IconUIResource(new ImageIcon(new BufferedImage(10, 10,
                BufferedImage.TYPE_INT_RGB)));
        UIManager.put("RadioButton.icon", icon);
        button.setUI(publicUI);
View Full Code Here

        UIManager.put("RadioButton.select", new ColorUIResource(Color.green));
        UIManager.put("RadioButton.foreground", new ColorUIResource(Color.cyan));
        UIManager.put("RadioButton.background", new ColorUIResource(Color.blue));
        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);
        Icon icon = new IconUIResource(new ImageIcon(new BufferedImage(10, 10,
                BufferedImage.TYPE_INT_RGB)));
        UIManager.put("RadioButton.icon", icon);
        button.setUI(publicUI);
View Full Code Here

        UIManager.put("CheckBox.select", new ColorUIResource(Color.green));
        UIManager.put("CheckBox.foreground", new ColorUIResource(Color.cyan));
        UIManager.put("CheckBox.background", new ColorUIResource(Color.blue));
        Font font = new FontUIResource(button.getFont().deriveFont(100f));
        UIManager.put("CheckBox.font", font);
        Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
        UIManager.put("CheckBox.border", border);
        Icon icon = new IconUIResource(new ImageIcon(new BufferedImage(10, 10,
                BufferedImage.TYPE_INT_RGB)));
        UIManager.put("CheckBox.icon", icon);
        button.setUI(publicUI);
View Full Code Here

        UIManager.put("CheckBox.select", new ColorUIResource(Color.green));
        UIManager.put("CheckBox.foreground", new ColorUIResource(Color.cyan));
        UIManager.put("CheckBox.background", new ColorUIResource(Color.blue));
        Font font = new FontUIResource(button.getFont().deriveFont(100f));
        UIManager.put("CheckBox.font", font);
        Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
        UIManager.put("CheckBox.border", border);
        Icon icon = new IconUIResource(new ImageIcon(new BufferedImage(10, 10,
                BufferedImage.TYPE_INT_RGB)));
        UIManager.put("CheckBox.icon", icon);
        button.setUI(publicUI);
View Full Code Here

        panelUI.uninstallUI(panel);
        assertNotNull(panel.getBackground());
        assertNotNull(panel.getForeground());
        assertNotNull(panel.getBorder());
        UIManager.put("Panel.background", Color.red);
        Border border2 = new BorderUIResource(BorderFactory.createEmptyBorder());
        UIManager.put("Panel.border", border2);
        panel.setUI(panelUI);
        panelUI.uninstallUI(panel);
        assertEquals(Color.red, panel.getBackground());
        assertNotNull(panel.getForeground());
View Full Code Here

    public void testInstallUI() {
        JPanel panel = new JPanel();
        assertTrue("opaque", panel.isOpaque());
        UIManager.put("Panel.background", new ColorUIResource(Color.red));
        UIManager.put("Panel.foreground", new ColorUIResource(Color.yellow));
        Border border2 = new BorderUIResource(BorderFactory.createEmptyBorder());
        UIManager.put("Panel.border", border2);
        panel.setOpaque(false);
        panel.setUI(panelUI);
        panelUI.installUI(panel);
        assertEquals(Color.red, panel.getBackground());
View Full Code Here

        UIManager.put("ToggleButton.select", new ColorUIResource(Color.green));
        UIManager.put("ToggleButton.foreground", new ColorUIResource(Color.cyan));
        UIManager.put("ToggleButton.background", new ColorUIResource(Color.blue));
        Font font = new FontUIResource(button.getFont().deriveFont(100f));
        UIManager.put("ToggleButton.font", font);
        Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
        UIManager.put("ToggleButton.border", border);
        button.setUI(publicUI);
        publicUI.installDefaults(button);
        assertEquals(Color.blue, button.getBackground());
        assertEquals(Color.cyan, button.getForeground());
View Full Code Here

TOP

Related Classes of javax.swing.plaf.BorderUIResource$EmptyBorderUIResource

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.