|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WColor
public class WColor
A class that specifies a color. A color corresponds to a CSS color. You can specify a color either using its red/green/blue components, or from a valid CSS name. The color supports an alpha channel, which determines the degree of transparency. An alpha value of 0 is completely transparent (and thus invisible), while a value of 255 is completely opaque.
| Field Summary | |
|---|---|
static WColor |
black
Black WColor object. |
static WColor |
blue
Blue WColor object. |
static WColor |
cyan
Cyan WColor object. |
static WColor |
darkBlue
Dark blue WColor object. |
static WColor |
darkCyan
Dark cyan WColor object. |
static WColor |
darkGray
Dark gray WColor object. |
static WColor |
darkGreen
Dark green WColor object. |
static WColor |
darkMagenta
Dark magenta WColor object. |
static WColor |
darkRed
Dark red WColor object. |
static WColor |
darkYellow
Dark yellow WColor object. |
static WColor |
gray
Gray WColor object. |
static WColor |
green
Green WColor object. |
static WColor |
lightGray
Light gray WColor object. |
static WColor |
magenta
White Magenta object. |
static WColor |
red
Red WColor object. |
static WColor |
transparent
Transparant WColor object. |
static WColor |
white
White WColor object. |
static WColor |
yellow
Yellow WColor object. |
| Constructor Summary | |
|---|---|
WColor()
Construct a default color. |
|
WColor(java.lang.CharSequence name)
Construct a color from a CSS name. |
|
WColor(int r,
int g,
int b)
Construct a color with given red/green/blue components. |
|
WColor(int r,
int g,
int b,
int a)
Construct a color with given red/green/blue/alpha components. |
|
| Method Summary | |
|---|---|
boolean |
equals(WColor other)
Indicates whether some other object is "equal to" this one. |
int |
getAlpha()
Returns the alpha component. |
int |
getBlue()
Returns the blue component. |
int |
getGreen()
Returns the green component. |
WString |
getName()
Get CSS name. |
int |
getRed()
Returns the red component. |
boolean |
isDefault()
Returns if the color is the default color. |
void |
setName(java.lang.CharSequence name)
Set the CSS name. |
void |
setRgb(int red,
int green,
int blue)
Set the red/green/blue components and a 255 for the alpha component. |
void |
setRgb(int red,
int green,
int blue,
int alpha)
Set the red/green/blue/alpha components. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static WColor white
public static WColor black
public static WColor red
public static WColor darkRed
public static WColor green
public static WColor darkGreen
public static WColor blue
public static WColor darkBlue
public static WColor cyan
public static WColor darkCyan
public static WColor magenta
public static WColor darkMagenta
public static WColor yellow
public static WColor darkYellow
public static WColor gray
public static WColor darkGray
public static WColor lightGray
public static WColor transparent
| Constructor Detail |
|---|
public WColor()
public WColor(int r,
int g,
int b,
int a)
setRgb(int red, int green, int blue, int alpha)
public WColor(int r,
int g,
int b)
setRgb(int, int, int)public WColor(java.lang.CharSequence name)
In either case, the result of the methods getRed(),
getGreen() and getBlue() is undefined.
See also http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color
| Method Detail |
|---|
public void setRgb(int red,
int green,
int blue,
int alpha)
public final void setRgb(int red,
int green,
int blue)
setRgb(int, int, int, int)public void setName(java.lang.CharSequence name)
In either case, the result of the methods getRed(),
getGreen() and getBlue() is undefined.
See also http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color
public boolean isDefault()
WColor()public int getRed()
setRgb(int, int, int, int) or
WColor(int, int, int, int).
public int getGreen()
setRgb(int, int, int, int) or
WColor(int, int, int, int).
public int getBlue()
setRgb(int, int, int, int) or
WColor(int, int, int, int).
public int getAlpha()
setRgb(int, int, int, int) or
WColor(int, int, int, int).
public WString getName()
setName(CharSequence name) or
WColor(CharSequence name).
public boolean equals(WColor other)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||