up: ZWT     index Zimbu documentation

CLASS ZWT.Color @public

summary

     

Specifies a color to be used for a Style.

It can be set as red-green-blue values or with ColorName.

int  $red @public  red value
int  $green @public  green value
int  $blue @public  blue value
ZWT.ColorName  $colorName @public  name of the color
 
NEW(colorName) @public  Create a Color with color name _colorName.
NEW(r, g, b) @public  Create a Color with Red, Green and Blue values.
$setRed(red) @public  Set the red value to red.
$setGreen(green) @public  Set the green value to green.
$setBlue(blue) @public  Set the blue value to blue.
$ToString() string @public  Return "Color(r, g, b)" or "Color(name)"
 

members (alphabetically)

     

int $blue @public

     

blue value

ZWT.ColorName $colorName @public

     

name of the color

int $green @public

     

green value

int $red @public

     

red value

PROC NEW(ZWT.ColorName colorName) @public

     

Create a Color with color name _colorName.

PROC NEW(int r, int g, int b) @public

     

Create a Color with Red, Green and Blue values.

The values will be limited to the range 0 to 255.

FUNC $ToString() string @public

     

Return "Color(r, g, b)" or "Color(name)"

PROC $setBlue(int blue) @public

     

Set the blue value to blue.

PROC $setGreen(int green) @public

     

Set the green value to green.

PROC $setRed(int red) @public

     

Set the red value to red.

credits

      The Class hierarchy, generated Javascript and a few other things are based on the Google Web Toolkit. http://code.google.com/webtoolkit/overview.html

license

      Copyright 2009 Bram Moolenaar All Rights Reserved.

      Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0