|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnodebox.graphics.Color
public final class Color
| Nested Class Summary | |
|---|---|
static class |
Color.Mode
|
| Field Summary | |
|---|---|
static Color |
BLACK
|
static Color |
WHITE
|
| Constructor Summary | |
|---|---|
Color()
Create an empty (black) color object. |
|
Color(Color color)
Create a new color with the the given color. |
|
Color(Color other)
Create a new color with the the given color. |
|
Color(double v)
Create a new color with the given grayscale value. |
|
Color(double v,
double a)
Create a new color with the given grayscale and alpha value. |
|
Color(double r,
double g,
double b)
Create a new color with the the given R/G/B value. |
|
Color(double x,
double y,
double z,
Color.Mode m)
Create a new color with the the given R/G/B value. |
|
Color(double r,
double g,
double b,
double a)
Create a new color with the the given R/G/B/A or H/S/B/A value. |
|
Color(double x,
double y,
double z,
double a,
Color.Mode m)
Create a new color with the the given R/G/B/A or H/S/B/A value. |
|
Color(String colorName)
|
|
| Method Summary | |
|---|---|
Color |
clone()
|
boolean |
equals(Object obj)
|
static Color |
fromHSB(double hue,
double saturation,
double brightness)
|
static Color |
fromHSB(double hue,
double saturation,
double brightness,
double alpha)
|
double |
getA()
|
double |
getAlpha()
|
Color |
getAwtColor()
|
double |
getB()
|
double |
getBlue()
|
double |
getBrightness()
|
double |
getG()
|
double |
getGreen()
|
double |
getH()
|
double |
getHue()
|
double |
getR()
|
double |
getRed()
|
double |
getS()
|
double |
getSaturation()
|
double |
getV()
|
boolean |
isVisible()
|
static Color |
parseColor(String value)
Parse a hexadecimal value and return a Color object. |
void |
set(Graphics2D g)
|
String |
toString()
Returns the color as a 8-bit hexadecimal value, e.g. |
static Color |
valueOf(String hex)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Color BLACK
public static final Color WHITE
| Constructor Detail |
|---|
public Color()
public Color(double v)
v - the gray component.
public Color(double v,
double a)
v - the grayscale value.a - the alpha value.
public Color(double x,
double y,
double z,
Color.Mode m)
x - the red or hue component.y - the green or saturation component.z - the blue or brightness component.m - the specified color mode.
public Color(double r,
double g,
double b)
r - the red component.g - the green component.b - the blue component.
public Color(double r,
double g,
double b,
double a)
r - the red component.g - the green component.b - the blue component.a - the alpha component.
public Color(double x,
double y,
double z,
double a,
Color.Mode m)
x - the red or hue component.y - the green or saturation component.z - the blue or brightness component.a - the alpha component.m - the specified color mode.public Color(String colorName)
public Color(Color color)
color - the color object.public Color(Color other)
other - the color object.| Method Detail |
|---|
public static Color fromHSB(double hue,
double saturation,
double brightness)
public static Color fromHSB(double hue,
double saturation,
double brightness,
double alpha)
public static Color valueOf(String hex)
public double getRed()
public double getR()
public double getGreen()
public double getG()
public double getBlue()
public double getB()
public double getAlpha()
public double getA()
public boolean isVisible()
public double getHue()
public double getH()
public double getSaturation()
public double getS()
public double getBrightness()
public double getV()
public Color getAwtColor()
public void set(Graphics2D g)
public Color clone()
clone in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic static Color parseColor(String value)
value - the hexadecimal color value, e.g. #995423ff
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||