Class tea.set.ButtonFilter
All Packages Class Hierarchy This Package Previous Next Index
Class tea.set.ButtonFilter
java.lang.Object
|
+----java.awt.image.ImageFilter
|
+----java.awt.image.RGBImageFilter
|
+----tea.set.ButtonFilter
- public class ButtonFilter
- extends RGBImageFilter
Buttonfilter class is used to convert a plain image to a 3D button look
and feel. It can generate either raised or lowered button.
-
ButtonFilter(boolean, int, int, int, int)
- Construct a ButtonFilter to convert an image to a button like look.
-
filterRGB(int, boolean, int)
-
-
filterRGB(int, int, int)
- Filter pixel color RGB.
ButtonFilter
public ButtonFilter(boolean press,
int p,
int b,
int w,
int h)
- Construct a ButtonFilter to convert an image to a button like look.
- Parameters:
- press - true if button is pressed.
- p - percentage to darken.
- b - border width.
- w - width of button.
- h - height of button.
filterRGB
public int filterRGB(int x,
int y,
int rgb)
- Filter pixel color RGB.
- Parameters:
- x - x coordinate of the pixel.
- y - y coordinate of the pixel.
- rgb - RGB value of the pixel.
- Returns:
- filtered RGB value.
- Overrides:
- filterRGB in class RGBImageFilter
filterRGB
public int filterRGB(int rgb,
boolean brighter,
int percent)
- Parameters:
- rgb - RGB value.
- brighter - true if filter to brighter color.
- percent - percentage of color change.
- Returns:
- filtered RGB value.
All Packages Class Hierarchy This Package Previous Next Index