Package sun.swing

Examples of sun.swing.ImageIconUIResource


     *         {@code Icon} can not be generated
     * @since 1.5
     */
    public Icon getDisabledIcon(JComponent component, Icon icon) {
        if (icon instanceof ImageIcon) {
            return new ImageIconUIResource(GrayFilter.
                   createDisabledImage(((ImageIcon)icon).getImage()));
        }
        return null;
    }
View Full Code Here


        @Override
        public Object createValue(UIDefaults table) {
            if (icon == null) {
                Image image = (Image)ShellFolder.get(nativeImageName);
                if (image != null) {
                    icon = new ImageIconUIResource(image);
                }
            }
            if (icon == null && fallbackName != null) {
                UIDefaults.LazyValue fallback = (UIDefaults.LazyValue)
                        SwingUtilities2.makeIcon(WindowsLookAndFeel.class,
View Full Code Here

    }

    static Icon getOceanToolBarIcon(Image i) {
        ImageProducer prod = new FilteredImageSource(i.getSource(),
                             new OceanToolBarImageFilter());
        return new ImageIconUIResource(Toolkit.getDefaultToolkit().createImage(prod));
    }
View Full Code Here

            min = ((Integer)range[0]).intValue();
            max = ((Integer)range[1]).intValue();
        }
        ImageProducer prod = new FilteredImageSource(image.getSource(),
                      new OceanDisabledButtonImageFilter(min , max));
        return new ImageIconUIResource(Toolkit.getDefaultToolkit().createImage(prod));
    }
View Full Code Here

            BufferedImage img = EffectUtils.createCompatibleTranslucentImage(
                    si.getIconWidth(), si.getIconHeight());
            Graphics2D gfx = img.createGraphics();
            si.paintIcon(component, gfx, 0, 0);
            gfx.dispose();
            return new ImageIconUIResource(GrayFilter.createDisabledImage(img));
        } else {
            return super.getDisabledIcon(component, icon);
        }
    }
View Full Code Here

                    icon.getIconWidth(), BufferedImage.TYPE_INT_ARGB);
            icon.paintIcon(component, img.getGraphics(), 0, 0);
            ImageFilter filter = new RGBGrayFilter();
            ImageProducer producer = new FilteredImageSource(img.getSource(), filter);
            Image resultImage = component.createImage(producer);
            return new ImageIconUIResource(resultImage);
        }
        return super.getDisabledIcon(component, icon);
    }
View Full Code Here

        @Override
  public Object createValue(UIDefaults table) {
      if (icon == null) {
    Image image = (Image)ShellFolder.get(nativeImageName);
    if (image != null) {
        icon = new ImageIconUIResource(image);
    }
      }
      if (icon == null && fallbackName != null) {
                UIDefaults.LazyValue fallback = (UIDefaults.LazyValue)
                        SwingUtilities2.makeIcon(WindowsLookAndFeel.class,
View Full Code Here

            BufferedImage img = EffectUtils.createCompatibleTranslucentImage(
                    si.getIconWidth(), si.getIconHeight());
            Graphics2D gfx = img.createGraphics();
            si.paintIcon(component, gfx, 0, 0);
            gfx.dispose();
            return new ImageIconUIResource(GrayFilter.createDisabledImage(img));
        } else {
            return super.getDisabledIcon(component, icon);
        }
    }
View Full Code Here

    }

    static Icon getOceanToolBarIcon(Image i) {
  ImageProducer prod = new FilteredImageSource(i.getSource(),
                             new OceanToolBarImageFilter());
  return new ImageIconUIResource(Toolkit.getDefaultToolkit().createImage(prod));
    }
View Full Code Here

            min = ((Integer)range[0]).intValue();
            max = ((Integer)range[1]).intValue();
        }
  ImageProducer prod = new FilteredImageSource(image.getSource(),
                      new OceanDisabledButtonImageFilter(min , max));
  return new ImageIconUIResource(Toolkit.getDefaultToolkit().createImage(prod));
    }
View Full Code Here

TOP

Related Classes of sun.swing.ImageIconUIResource

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.