| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | GrayFilter(boolean
a boolean -- true if the pixels should be brightened b, int an int in the range 0..100 that determines the percentage
of gray, where 100 is the darkest gray, and 0 is the lightest p)Constructs a GrayFilter object that filters a color image to a grayscale image. |
| Modifier and Type | Method and Description |
|---|---|
| public static Image | Returns: the new grayscale image created fromian i)Image to be created as disabledCreates a disabled image |
| private static Image | |
| public int | filterRGB(int x, int y, int rgb)
Implements abstract java. Overrides |
| brighter | back to summary |
|---|---|
| private boolean brighter | |
| percent | back to summary |
|---|---|
| private int percent | |
| GrayFilter | back to summary |
|---|---|
| public GrayFilter(boolean b, int p) Constructs a GrayFilter object that filters a color image to a grayscale image. Used by buttons to create disabled ("grayed out") button images.
| |
| createDisabledImage | back to summary |
|---|---|
| public static Image createDisabledImage(Image i) Creates a disabled image | |
| createDisabledImageImpl | back to summary |
|---|---|
| private static Image createDisabledImageImpl(Image i) | |
| filterRGB | back to summary |
|---|---|
| public int filterRGB(int x, int y, int rgb) Implements abstract java. Overrides | |