Package javax.swing.plaf

Examples of javax.swing.plaf.IconUIResource


  {
    // check null argument
    boolean pass = false;
    try
    {
      IconUIResource r = new IconUIResource(null);
    }
    catch (IllegalArgumentException e)
    {
      pass = true;
    }
View Full Code Here


        if (safeIcon == null) {
            safeIcon = defaultIcon;
        }
       
        if (!(safeIcon instanceof UIResource)) {
            safeIcon = new IconUIResource(safeIcon);
        }
       
        return safeIcon;
    }
View Full Code Here

    private IconUIResource getIcon(String resourceName) {
        URL url = getClass().getResource(resourceName);
        if (url == null) {
            return null;
        } else {
            return new IconUIResource(new ImageIcon(url));
        }
    }
View Full Code Here

    initComponents();
    pickerButton.setIcon(new TransitionAwareIcon(pickerButton,
        new TransitionAwareIcon.Delegate() {
          @Override
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            return new IconUIResource(SubstanceImageCreator
                .getSearchIcon(15, scheme, pickerButton
                    .getComponentOrientation()
                    .isLeftToRight()));
          }
        }, "ColorChooser.colorPickerIcon"));
View Full Code Here

      g2d.drawImage(result, 0, 0, null);
      g2d.dispose();
      result = intermediate;
    }

    return new IconUIResource(new ImageIcon(result));
  }
View Full Code Here

        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);
        Icon icon = new IconUIResource(new ImageIcon(new BufferedImage(10, 10,
                BufferedImage.TYPE_INT_RGB)));
        UIManager.put("RadioButton.icon", icon);
        button.setUI(ui);
        ui.installDefaults(button);
        assertEquals("background", Color.blue, button.getBackground());
View Full Code Here

        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);
        publicUI.installDefaults(button);
        publicUI.uninstallDefaults(button);
View Full Code Here

        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);
        publicUI.installDefaults(button);
        assertEquals(Color.blue, button.getBackground());
View Full Code Here

        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);
        publicUI.installDefaults(button);
        publicUI.uninstallDefaults(button);
View Full Code Here

        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);
        publicUI.installDefaults(button);
        assertEquals(Color.blue, button.getBackground());
View Full Code Here

TOP

Related Classes of javax.swing.plaf.IconUIResource

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.