Java ImageIcon makeDisabledImage(ImageIcon in)

Here you can find the source of makeDisabledImage(ImageIcon in)

Description

make Disabled Image

License

Apache License

Declaration

public static ImageIcon makeDisabledImage(ImageIcon in) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.awt.*;

import javax.swing.*;

public class Main {
    public static ImageIcon makeDisabledImage(ImageIcon in) {
        if (in == null)
            return (null);
        Image greyImage = makeGrayImage(in.getImage());
        return (new ImageIcon(greyImage));
    }//from w w  w  . j a va  2s . co m

    public static Image makeGrayImage(Image in) {
        return (GrayFilter.createDisabledImage(in)); // swing 05
        // return(GrayFilter.createGrayImage(in)); // swing 04
    }
}

Related

  1. imageToBytes(ImageIcon icon)
  2. imageWithBackground(ImageIcon icon, Color colorBg)
  3. initImageIcon(Class cl)
  4. isValidImg(ImageIcon img)
  5. loadJavaInternal(ImageIcon r, Dimension d, boolean noStretch)
  6. paintWithWatermarkHelper(JComponent component, ImageIcon watermark, Graphics g)
  7. parseImageIcon(Image image)
  8. prepareImage(ImageIcon icon, int x, int y)
  9. saveImage(ImageIcon picture, String targetfile)