public final class RGBGrayFilter
extends java.awt.image.RGBImageFilter
The high-resolution gray filter can be disabled globally using
Options.setHiResGrayFilterEnabled(boolean); it is enabled by default.
The global setting can be overridden per component by setting
the client property key Options.HI_RES_DISABLED_ICON_CLIENT_KEY
to Boolean.FALSE.
Thanks to Andrej Golovnin for suggesting a simpler filter formula.
| Modifier and Type | Method and Description |
|---|---|
int |
filterRGB(int x,
int y,
int rgb)
Converts a single input pixel in the default RGB ColorModel to a single
gray pixel.
|
static javax.swing.Icon |
getDisabledIcon(javax.swing.JComponent component,
javax.swing.Icon icon)
Returns an icon with a disabled appearance.
|
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModelpublic static javax.swing.Icon getDisabledIcon(javax.swing.JComponent component,
javax.swing.Icon icon)
component - the component that will display the icon, may be null.icon - the icon to generate disabled icon from.public int filterRGB(int x,
int y,
int rgb)
filterRGB in class java.awt.image.RGBImageFilterx - the horizontal pixel coordinatey - the vertical pixel coordinatergb - the integer pixel representation in the default RGB color modelColorModel.getRGBdefault(),
RGBImageFilter.filterRGBPixels(int, int, int, int, int[], int, int)Copyright © 2001-2009 JGoodies Karsten Lentzsch. All Rights Reserved.