|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.minueto.MinuetoColor
public class MinuetoColor
The MinuetoColor class is used to store information describing a
color. Several prefined colors defined as constants can also be found in this
class.
Note: Minueto defines a color as a RGB value (red/green/blue). If you are new to computer graphics, please note that this color scheme is significantly different from the one used for paper (cyan, blue, yellow, black, also known as CMYK).
| Field Summary | |
|---|---|
static MinuetoColor |
BLACK
The color Black. |
static MinuetoColor |
BLUE
The color Blue. |
static MinuetoColor |
GREEN
The color Green. |
static MinuetoColor |
RED
The color Red. |
static MinuetoColor |
WHITE
The color White |
static MinuetoColor |
YELLOW
The color Yellow. |
| Constructor Summary | |
|---|---|
MinuetoColor(java.awt.Color color)
Creates a new RGBA color from a Java AWT Color object |
|
MinuetoColor(double red,
double green,
double blue)
Creates a new RGB color. |
|
MinuetoColor(double red,
double green,
double blue,
double alpha)
Creates a new RGBA color. |
|
MinuetoColor(int color)
Creates a MinuetoColor object from a single int value just as java.awt.Color: Creates an opaque sRGB color with the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. |
|
MinuetoColor(int red,
int green,
int blue)
Creates a new RGB color. |
|
MinuetoColor(int red,
int green,
int blue,
int alpha)
Creates a new RGBA color. |
|
| Method Summary | |
|---|---|
MinuetoColor |
darken(double factor)
Returns a darker color. |
MinuetoColor |
darken(int factor)
Returns a darker color. |
int |
getAlpha()
Returns the alpha value of this color. |
int |
getARGBColorValue()
Returns the sRGB color code for this color as an integer. |
java.awt.Color |
getAWTColor()
Returns the equivalent AWT color object. |
int |
getBlue()
Returns the blue value of this color. |
int |
getGreen()
Returns the green value of this color. |
int |
getRed()
Returns the red value of this color. |
MinuetoColor |
lighten(double factor)
Returns a lighter color. |
MinuetoColor |
lighten(int factor)
Returns a lighter color. |
java.lang.String |
toString()
Returns a string representation of the color. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final MinuetoColor RED
public static final MinuetoColor GREEN
public static final MinuetoColor BLUE
public static final MinuetoColor YELLOW
public static final MinuetoColor BLACK
public static final MinuetoColor WHITE
| Constructor Detail |
|---|
public MinuetoColor(int red,
int green,
int blue)
red - int denoting the red color value.green - int denoting the green color value.blue - int denoting the blue color value.
MinuetoInvalidColorValueException - if an invalid color value is passed.public MinuetoColor(java.awt.Color color)
color - java.awt.Color ths color valueColorpublic MinuetoColor(int color)
color - int
public MinuetoColor(int red,
int green,
int blue,
int alpha)
red - int denoting the red color value.green - int denoting the green color value.blue - int denoting the blue color value.alpha - int denothing the alpha color value.
MinuetoInvalidColorValueException - if an invalid color value is passed.
public MinuetoColor(double red,
double green,
double blue)
red - double denoting the red color value.green - double denoting the green color value.blue - Double double the blue color value.
MinuetoInvalidColorValueException - if an invalid color value is passed.
public MinuetoColor(double red,
double green,
double blue,
double alpha)
red - double denoting the red color value.green - double denoting the green color value.blue - double denoting the blue color value.alpha - double denoting the alpha color value.
MinuetoInvalidColorValueException - if an invalid color value is passed.| Method Detail |
|---|
public MinuetoColor darken(double factor)
factor - double that determines how darker the color will be.
MinuetoColor darker color.public MinuetoColor darken(int factor)
factor - double that determines how darker the color will be.
MinuetoColor darker color.public MinuetoColor lighten(double factor)
factor - double that determines how lighter the color will be.
MinuetoColor lighter color.public MinuetoColor lighten(int factor)
factor - double that determines how lighter the color will be.
MinuetoColor lighter color.public int getBlue()
int denoting the blue value of this color.public int getRed()
int denoting the red value of this color.public int getGreen()
int denoting the green value of this color.public int getAlpha()
int denoting the alpha value of this color.public java.awt.Color getAWTColor()
Color Color code of the object.public int getARGBColorValue()
int of the sRGB color code.public java.lang.String toString()
toString in class java.lang.ObjectString containing the color information.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||