All Packages Class Hierarchy This Package Previous Next Index
Class tropo.awt.TRColor
java.lang.Object
|
+----tropo.awt.TRColor
- public class TRColor
- extends Object
Color manipulation.
-
SystemColorControlDkShadow
-
-
SystemColorControlHighlight
-
-
SystemColorControlLtHighlight
-
-
SystemColorControlShadow
-
-
blend(Color, Color, int)
- Return a color that is pc% beween low and high.
-
blend(int, int, int)
- Blend two integers together.
-
brighter(Color)
- Return a brighter shade of this color.
-
darker(Color)
- Return a darker shade of this color.
-
formRBG(int, int, int)
- Form color components into an RBG integer - this routine must
be somewhere else but I couldn't find it - ColorModel seems
to at least provide the reverse.
-
formRGB(int, int, int, int)
- Form color components into an ARBG integer - this routine must
be somewhere else but I couldn't find it - ColorModel seems
to at least provide the reverse.
-
geoBlend(Color, Color, int)
- Return a color that is pc% beween low and high in
a "geometric" sense.
-
geoBlend(int, int, int)
- Blend two integers together in a geometric sense.
-
lookup(String)
- Look up a color by name.
-
main(String[])
-
SystemColorControlLtHighlight
public static Color SystemColorControlLtHighlight
SystemColorControlHighlight
public static Color SystemColorControlHighlight
SystemColorControlDkShadow
public static Color SystemColorControlDkShadow
SystemColorControlShadow
public static Color SystemColorControlShadow
blend
public static Color blend(Color low,
Color high,
int pc)
- Return a color that is pc% beween low and high.
Note that the order of color parameters is significant
here. We return (low + (high-low)*pc).
- Parameters:
- low - the starting color
- high - the ending color
- pc - the percent to add to low
- See Also:
- blend, geoBlend
blend
public static int blend(int low,
int high,
int pc)
- Blend two integers together.
geoBlend
public static Color geoBlend(Color low,
Color high,
int pc)
- Return a color that is pc% beween low and high in
a "geometric" sense. This is experimental and not proven
to be correct.
Note that the order of color parameters is significant
here. We return (low + (high-low)*pc).
- Parameters:
- low - the starting color
- high - the ending color
- pc - the percent to add to low
- See Also:
- blend
geoBlend
public static int geoBlend(int low,
int high,
int pc)
- Blend two integers together in a geometric sense.
Unproven and experimental.
brighter
public static Color brighter(Color c)
- Return a brighter shade of this color.
darker
public static Color darker(Color c)
- Return a darker shade of this color.
lookup
public static Color lookup(String name)
- Look up a color by name. We do what Color.getColor should do.
The name must be one of the constant color names...
If we fail we automagically call Color.decode().
- See Also:
- getColor, decode
formRBG
public static int formRBG(int red,
int green,
int blue)
- Form color components into an RBG integer - this routine must
be somewhere else but I couldn't find it - ColorModel seems
to at least provide the reverse.
- Parameters:
- red - the red component [0..255].
- green - the green component [0..255].
- blue - the blue component [0..255].
- Returns:
- an RBG int w/ alpha=0
- See Also:
- ColorModel, getRGBDefault
formRGB
public static int formRGB(int alpha,
int red,
int green,
int blue)
- Form color components into an ARBG integer - this routine must
be somewhere else but I couldn't find it - ColorModel seems
to at least provide the reverse. Be careful - alpha is the
first argument to this (because it is the first 8 bits in the
result).
- Parameters:
- alpha - the alpha component [0..255]
- red - the red component [0..255].
- green - the green component [0..255].
- blue - the blue component [0..255].
- Returns:
- an RBG int
- See Also:
- ColorModel, getRGBDefault
main
public static void main(String a[])
All Packages Class Hierarchy This Package Previous Next Index