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.


Variable Index

 o SystemColorControlDkShadow
 o SystemColorControlHighlight
 o SystemColorControlLtHighlight
 o SystemColorControlShadow

Method Index

 o blend(Color, Color, int)
Return a color that is pc% beween low and high.
 o blend(int, int, int)
Blend two integers together.
 o brighter(Color)
Return a brighter shade of this color.
 o darker(Color)
Return a darker shade of this color.
 o 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.
 o 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.
 o geoBlend(Color, Color, int)
Return a color that is pc% beween low and high in a "geometric" sense.
 o geoBlend(int, int, int)
Blend two integers together in a geometric sense.
 o lookup(String)
Look up a color by name.
 o main(String[])

Variables

 o SystemColorControlLtHighlight
 public static Color SystemColorControlLtHighlight
 o SystemColorControlHighlight
 public static Color SystemColorControlHighlight
 o SystemColorControlDkShadow
 public static Color SystemColorControlDkShadow
 o SystemColorControlShadow
 public static Color SystemColorControlShadow

Methods

 o 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
 o blend
 public static int blend(int low,
                         int high,
                         int pc)
Blend two integers together.

 o 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
 o geoBlend
 public static int geoBlend(int low,
                            int high,
                            int pc)
Blend two integers together in a geometric sense. Unproven and experimental.

 o brighter
 public static Color brighter(Color c)
Return a brighter shade of this color.

 o darker
 public static Color darker(Color c)
Return a darker shade of this color.

 o 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
 o 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
 o 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
 o main
 public static void main(String a[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index