Index Topic Contents | |||
Previous Topic: CameraBvr Class Next Topic: Cycler Class |
ColorBvr Class
public class ColorBvr extends Behavior { // Methods public NumberBvr getBlue(); public NumberBvr getGreen(); public NumberBvr getHue(); public NumberBvr getLightness(); public NumberBvr getRed(); public NumberBvr getSaturation(); public static ColorBvr newUninitBvr(); }A ColorBvr is an object that represents a color behavior. At any given time, the value of the behavior is a color value that represents a specific color. Each color value consists of a combination of component values that specify either red, green and blue intensity or hue, saturation, and lightness.
Because component values are number behaviors (NumberBvr objects), the value of the color behavior may change over time as the number behaviors change.
For more information about behaviors, see the Behavior class.
ColorBvr Methods
ColorBvr Class
getBlueCreates a number behavior that represents the value of the blue component of the corresponding color behavior.
public NumberBvr getBlue( );
Return Values
Returns the NumberBvr object.
See Also
ColorBvr Class
getGreenCreates a number behavior that represents the value of the green component of the corresponding color behavior.
public NumberBvr getGreen( );
Return Values
Returns the NumberBvr object.
See Also
ColorBvr Class
getHueCreates a number behavior that represents the value of the hue of the corresponding color behavior.
public NumberBvr getHue( );
Return Values
Returns the NumberBvr object.
See Also
ColorBvr Class
getLightnessCreates a number behavior that represents the value of the lightness of the corresponding color behavior.
public NumberBvr getLightness( );
Return Values
Returns the NumberBvr object.
See Also
ColorBvr Class
getRedCreates a number behavior that represents the value of the red component of the corresponding color behavior.
public NumberBvr getRed( );
Return Values
Returns the NumberBvr object.
See Also
ColorBvr Class
getSaturationCreates a number behavior that represents the value of the saturation of the corresponding color behavior.
public NumberBvr getSaturation( );
Return Values
Returns the NumberBvr object.
See Also
ColorBvr Class
newUninitBvrThis method allows you to refer to a color behavior before that behavior has been defined. With this method you can create the behavior and use it in the definition of other behaviors, but not actually define its contents until some later point. (This is accomplished with the init method, which is available on all behaviors.) The system generates a run-time error if you initialize a non-uninitialized behavior, initialize an uninitialized behavior that has already been initialized, or run an initialized behavior that has not yet been initialized.
public static ColorBvr newUninitBvr( );
Relevant Methods from the Statics Class
The following methods are defined in the Statics class and are most relevant to objects of type ColorBvr:
public static ColorBvr colorHsl(NumberBvr h, NumberBvr s, NumberBvr l);
public static ColorBvr colorRgb(NumberBvr r, NumberBvr g, NumberBvr b);
public static ColorBvr colorRgb255(short r, short g, short b);
Relevant Fields from the Statics Class
The following fields are defined in the Statics class and are most relevant to objects of type ColorBvr:
public final static ColorBvr aqua;
public final static ColorBvr black;
public final static ColorBvr blue;
public final static ColorBvr cyan;
public final static ColorBvr fuchsia;
public final static ColorBvr gray;
public final static ColorBvr green;
public final static ColorBvr lime;
public final static ColorBvr magenta;
public final static ColorBvr maroon;
public final static ColorBvr navy;
public final static ColorBvr olive;
public final static ColorBvr purple;
public final static ColorBvr red;
public final static ColorBvr silver;
public final static ColorBvr teal;
public final static ColorBvr white;
public final static ColorBvr yellow;
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.