Package javax.swing.plaf

Examples of javax.swing.plaf.IconUIResource


    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


        selectedPaths.put(pathId, selectionPath.getLastPathComponent());
        prevStateMap.put(pathId, ComponentState.SELECTED);
      }
    }

    setExpandedIcon(new IconUIResource(SubstanceIconFactory.getTreeIcon(
        this.tree, false)));
    setCollapsedIcon(new IconUIResource(SubstanceIconFactory.getTreeIcon(
        this.tree, true)));

    // instead of computing the cell renderer insets on
    // every cell rendering, compute it once and expose to the
    // SubstanceDefaultTreeCellRenderer
View Full Code Here

    }

    public void testGetIconForType() throws InterruptedException {
        paneUI.optionPane = new JOptionPane();
        paneUI.optionPane.setUI(paneUI);
        Icon icon11 = new IconUIResource(new ImageIcon(new BufferedImage(10, 20,
                BufferedImage.TYPE_INT_RGB)));
        Icon icon21 = new IconUIResource(new ImageIcon(new BufferedImage(30, 40,
                BufferedImage.TYPE_INT_RGB)));
        Icon icon31 = new IconUIResource(new ImageIcon(new BufferedImage(50, 60,
                BufferedImage.TYPE_INT_RGB)));
        Icon icon41 = new IconUIResource(new ImageIcon(new BufferedImage(70, 80,
                BufferedImage.TYPE_INT_RGB)));
        UIManager.put("OptionPane.errorIcon", icon11);
        UIManager.put("OptionPane.informationIcon", icon21);
        UIManager.put("OptionPane.questionIcon", icon31);
        UIManager.put("OptionPane.warningIcon", icon41);
View Full Code Here

        createImage(location),
        count, horizontal
        );

        for (int i=0; i < count; i++) {
            icons[i] = new IconUIResource(new ImageIcon(images[i]));
        }
        return icons;
    }
View Full Code Here

     * @return disabled icon, or null if a suitable icon can not be generated.
     */
    public Icon getDisabledIcon(JComponent component, Icon icon) {
        Icon disabledIcon = RGBGrayFilter.getDisabledIcon(component, icon);
        return disabledIcon != null
             ? new IconUIResource(disabledIcon)
             : null;
    }
View Full Code Here

    public static Object makeIcon(final Class<?> c, final String path) {
        return new UIDefaults.LazyValue() {
            public Object createValue(final UIDefaults uiDefaults) {
                URL resource = c.getResource(path);
                return resource != null ? new IconUIResource(new ImageIcon(resource))
                                        : null;
            }
            public String toString() {
                return "Lazy Value: (lf) " + c.getName() + "  " + path;
            }
View Full Code Here

    public static Object makeIcon(final Class<?> c, final String path) {
        return new UIDefaults.LazyValue() {
            public Object createValue(final UIDefaults uiDefaults) {
                URL resource = c.getResource(path);
                return resource != null ? new IconUIResource(new ImageIcon(resource))
                                        : null;
            }
            public String toString() {
                return "Lazy Value: (lf) " + c.getName() + "  " + path;
            }
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

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.