java.awt
Class Color

java.lang.Object
  |
  +--java.awt.Color
All Implemented Interfaces:
Paint, Serializable, Transparency
Direct Known Subclasses:
SystemColor

public class Color
extends Object
implements Paint, Serializable

Safe:

See Also:
Serialized Form

Field Summary
static Color black
          Enabled: The color black.
static Color BLACK
          Suppressed: The color black.
static Color blue
          Enabled: The color blue.
static Color BLUE
          Suppressed: The color blue.
private  java.awt.color.ColorSpace cs
          The ColorSpace.
static Color cyan
          Enabled: The color cyan.
static Color CYAN
          Suppressed: The color cyan.
static Color DARK_GRAY
          Suppressed: The color dark gray.
static Color darkGray
          Enabled: The color dark gray.
private static double FACTOR
           
private  float falpha
          The alpha value as a float component.
private  float[] frgbvalue
          The color value in the default sRGB ColorSpace as float components (no alpha).
private  float[] fvalue
          The color value in the native ColorSpace as float components (no alpha).
static Color gray
          Enabled: The color gray.
static Color GRAY
          Suppressed: The color gray.
static Color green
          Enabled: The color green.
static Color GREEN
          Suppressed: The color green.
static Color LIGHT_GRAY
          Suppressed: The color light gray.
static Color lightGray
          Enabled: The color light gray.
static Color magenta
          Enabled: The color magenta.
static Color MAGENTA
          Suppressed: The color magenta.
static Color orange
          Enabled: The color orange.
static Color ORANGE
          Suppressed: The color orange.
private  long pData
          Private data.
static Color pink
          Enabled: The color pink.
static Color PINK
          Suppressed: The color pink.
static Color red
          Enabled: The color red.
static Color RED
          Suppressed: The color red.
private static long serialVersionUID
           
private  PaintContext theContext
          The paint context used to generate a solid color pattern.
(package private)  int value
          The color value.
static Color white
          Enabled: The color white.
static Color WHITE
          Suppressed: The color white.
static Color yellow
          Enabled: The color yellow.
static Color YELLOW
          Suppressed: The color yellow.
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
Color(java.awt.color.ColorSpace cspace, float[] components, float alpha)
          Enabled: Creates a color in the specified ColorSpace with the color components specified in the float array and the specified alpha.
Color(float r, float g, float b)
          Enabled: Creates an opaque sRGB color with the specified red, green, and blue values in the range (0.0 - 1.0).
Color(float r, float g, float b, float a)
          Enabled: Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0.0 - 1.0).
Color(int rgb)
          Enabled: 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.
Color(int rgba, boolean hasalpha)
          Enabled: Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
Color(int r, int g, int b)
          Enabled: Creates an opaque sRGB color with the specified red, green, and blue values in the range (0 - 255).
Color(int r, int g, int b, int a)
          Enabled: Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255).
 
Method Summary
 Color brighter()
          Enabled: Creates a new Color that is a brighter version of this Color.
 PaintContext createContext(java.awt.image.ColorModel cm, Rectangle r, java.awt.geom.Rectangle2D r2d, java.awt.geom.AffineTransform xform, RenderingHints hints)
          Enabled: Creates and returns a PaintContext used to generate a solid color pattern.
 Color darker()
          Enabled: Creates a new Color that is a darker version of this Color.
static Color decode(String nm)
          Enabled: Converts a String to an integer and returns the specified opaque Color.
 boolean equals(Object obj)
          Suppressed: Determines whether another object is equal to this Color.
 int getAlpha()
          Enabled: Returns the alpha component in the range 0-255.
 int getBlue()
          Enabled: Returns the blue component in the range 0-255 in the default sRGB space.
static Color getColor(String nm)
          Enabled: Finds a color in the system properties.
static Color getColor(String nm, Color v)
          Enabled: Finds a color in the system properties.
static Color getColor(String nm, int v)
          Enabled: Finds a color in the system properties.
 float[] getColorComponents(java.awt.color.ColorSpace cspace, float[] compArray)
          Enabled: Returns a float array containing only the color components of the Color in the ColorSpace specified by the cspace parameter.
 float[] getColorComponents(float[] compArray)
          Enabled: Returns a float array containing only the color components of the Color, in the ColorSpace of the Color.
 java.awt.color.ColorSpace getColorSpace()
          Enabled: Returns the ColorSpace of this Color.
 float[] getComponents(java.awt.color.ColorSpace cspace, float[] compArray)
          Enabled: Returns a float array containing the color and alpha components of the Color, in the ColorSpace specified by the cspace parameter.
 float[] getComponents(float[] compArray)
          Enabled: Returns a float array containing the color and alpha components of the Color, in the ColorSpace of the Color.
 int getGreen()
          Enabled: Returns the green component in the range 0-255 in the default sRGB space.
static Color getHSBColor(float h, float s, float b)
          Enabled: Creates a Color object based on the specified values for the HSB color model.
 int getRed()
          Enabled: Returns the red component in the range 0-255 in the default sRGB space.
 int getRGB()
          Enabled: Returns the RGB value representing the color in the default sRGB ColorModel.
 float[] getRGBColorComponents(float[] compArray)
          Enabled: Returns a float array containing only the color components of the Color, in the default sRGB color space.
 float[] getRGBComponents(float[] compArray)
          Enabled: Returns a float array containing the color and alpha components of the Color, as represented in the default sRGB color space.
 int getTransparency()
          Enabled: Returns the transparency mode for this Color.
 int hashCode()
          Suppressed: Computes the hash code for this Color.
static int HSBtoRGB(float hue, float saturation, float brightness)
          Enabled: Converts the components of a color, as specified by the HSB model, to an equivalent set of values for the default RGB model.
private static void initIDs()
          Initialize JNI field and method IDs
static float[] RGBtoHSB(int r, int g, int b, float[] hsbvals)
          Enabled: Converts the components of a color, as specified by the default RGB model, to an equivalent set of values for hue, saturation, and brightness that are the three components of the HSB model.
private static void testColorValueRange(float r, float g, float b, float a)
          Checks the color float components supplied for validity.
private static void testColorValueRange(int r, int g, int b, int a)
          Checks the color integer components supplied for validity.
 String toString()
          Suppressed: Returns a string representation of this Color.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

white

public static final Color white
Enabled: The color white. In the default sRGB space.


WHITE

public static final Color WHITE
Suppressed: The color white. In the default sRGB space.


lightGray

public static final Color lightGray
Enabled: The color light gray. In the default sRGB space.


LIGHT_GRAY

public static final Color LIGHT_GRAY
Suppressed: The color light gray. In the default sRGB space.


gray

public static final Color gray
Enabled: The color gray. In the default sRGB space.


GRAY

public static final Color GRAY
Suppressed: The color gray. In the default sRGB space.


darkGray

public static final Color darkGray
Enabled: The color dark gray. In the default sRGB space.


DARK_GRAY

public static final Color DARK_GRAY
Suppressed: The color dark gray. In the default sRGB space.


black

public static final Color black
Enabled: The color black. In the default sRGB space.


BLACK

public static final Color BLACK
Suppressed: The color black. In the default sRGB space.


red

public static final Color red
Enabled: The color red. In the default sRGB space.


RED

public static final Color RED
Suppressed: The color red. In the default sRGB space.


pink

public static final Color pink
Enabled: The color pink. In the default sRGB space.


PINK

public static final Color PINK
Suppressed: The color pink. In the default sRGB space.


orange

public static final Color orange
Enabled: The color orange. In the default sRGB space.


ORANGE

public static final Color ORANGE
Suppressed: The color orange. In the default sRGB space.


yellow

public static final Color yellow
Enabled: The color yellow. In the default sRGB space.


YELLOW

public static final Color YELLOW
Suppressed: The color yellow. In the default sRGB space.


green

public static final Color green
Enabled: The color green. In the default sRGB space.


GREEN

public static final Color GREEN
Suppressed: The color green. In the default sRGB space.


magenta

public static final Color magenta
Enabled: The color magenta. In the default sRGB space.


MAGENTA

public static final Color MAGENTA
Suppressed: The color magenta. In the default sRGB space.


cyan

public static final Color cyan
Enabled: The color cyan. In the default sRGB space.


CYAN

public static final Color CYAN
Suppressed: The color cyan. In the default sRGB space.


blue

public static final Color blue
Enabled: The color blue. In the default sRGB space.


BLUE

public static final Color BLUE
Suppressed: The color blue. In the default sRGB space.


pData

private transient long pData
Private data.


value

int value
The color value.

See Also:
getRGB()

frgbvalue

private float[] frgbvalue
The color value in the default sRGB ColorSpace as float components (no alpha). If null after object construction, this must be an sRGB color constructed with 8-bit precision, so compute from the int color value.

See Also:
getRGBColorComponents(float[]), getRGBComponents(float[])

fvalue

private float[] fvalue
The color value in the native ColorSpace as float components (no alpha). If null after object construction, this must be an sRGB color constructed with 8-bit precision, so compute from the int color value.

See Also:
getRGBColorComponents(float[]), getRGBComponents(float[])

falpha

private float falpha
The alpha value as a float component. If frgbvalue is null, this is not valid data, so compute from the int color value.

See Also:
getRGBComponents(float[]), getComponents(float[])

cs

private java.awt.color.ColorSpace cs
The ColorSpace. If null, then it's default is sRGB.

See Also:
getColor(java.lang.String), getColorSpace(), getColorComponents(float[])

serialVersionUID

private static final long serialVersionUID

FACTOR

private static final double FACTOR

theContext

private transient PaintContext theContext
The paint context used to generate a solid color pattern.

See Also:
createContext()
Constructor Detail

Color

public Color(int r,
             int g,
             int b)
Enabled: Creates an opaque sRGB color with the specified red, green, and blue values in the range (0 - 255). The actual color used in rendering depends on finding the best match given the color space available for a given output device. Alpha is defaulted to 255.

Parameters:
r - the red component
g - the green component
b - the blue component
See Also:
getRed(), getGreen(), getBlue(), getRGB()

Color

public Color(int r,
             int g,
             int b,
             int a)
Enabled: Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255).

Parameters:
r - the red component
g - the green component
b - the blue component
a - the alpha component
See Also:
getRed(), getGreen(), getBlue(), getAlpha(), getRGB()

Color

public Color(int rgb)
Enabled: 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. The actual color used in rendering depends on finding the best match given the color space available for a particular output device. Alpha is defaulted to 255.

Parameters:
rgb - the combined RGB components
See Also:
java.awt.image.ColorModel#getRGBdefault, getRed(), getGreen(), getBlue(), getRGB()

Color

public Color(int rgba,
             boolean hasalpha)
Enabled: Creates an sRGB color with the specified combined RGBA value consisting of the alpha component in bits 24-31, the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. If the hasalpha argument is false, alpha is defaulted to 255.

Parameters:
rgba - the combined RGBA components
hasalpha - true if the alpha bits are valid; false otherwise
See Also:
java.awt.image.ColorModel#getRGBdefault, getRed(), getGreen(), getBlue(), getAlpha(), getRGB()

Color

public Color(float r,
             float g,
             float b)
Enabled: Creates an opaque sRGB color with the specified red, green, and blue values in the range (0.0 - 1.0). Alpha is defaulted to 1.0. The actual color used in rendering depends on finding the best match given the color space available for a particular output device.

Parameters:
r - the red component
g - the green component
b - the blue component
See Also:
getRed(), getGreen(), getBlue(), getRGB()

Color

public Color(float r,
             float g,
             float b,
             float a)
Enabled: Creates an sRGB color with the specified red, green, blue, and alpha values in the range (0.0 - 1.0). The actual color used in rendering depends on finding the best match given the color space available for a particular output device.

Parameters:
r - the red component
g - the green component
b - the blue component
a - the alpha component
See Also:
getRed(), getGreen(), getBlue(), getAlpha(), getRGB()

Color

public Color(java.awt.color.ColorSpace cspace,
             float[] components,
             float alpha)
Enabled: Creates a color in the specified ColorSpace with the color components specified in the float array and the specified alpha. The number of components is determined by the type of the ColorSpace. For example, RGB requires 3 components, but CMYK requires 4 components.

Parameters:
cspace - the ColorSpace to be used to interpret the components
components - an arbitrary number of color components that is compatible with the
alpha - alpha value
Throws:
IllegalArgumentException - if any of the values in the components array or alpha is outside of the range 0.0 to 1.0
See Also:
getComponents(float[]), getColorComponents(float[])
Method Detail

initIDs

private static void initIDs()
Initialize JNI field and method IDs


testColorValueRange

private static void testColorValueRange(int r,
                                        int g,
                                        int b,
                                        int a)
Checks the color integer components supplied for validity. Throws an IllegalArgumentException if the value is out of range.

Parameters:
r - the Red component
g - the Green component
b - the Blue component

testColorValueRange

private static void testColorValueRange(float r,
                                        float g,
                                        float b,
                                        float a)
Checks the color float components supplied for validity. Throws an IllegalArgumentException if the value is out of range.

Parameters:
r - the Red component
g - the Green component
b - the Blue component

getRed

public int getRed()
Enabled: Returns the red component in the range 0-255 in the default sRGB space.

Returns:
the red component.
See Also:
getRGB()

getGreen

public int getGreen()
Enabled: Returns the green component in the range 0-255 in the default sRGB space.

Returns:
the green component.
See Also:
getRGB()

getBlue

public int getBlue()
Enabled: Returns the blue component in the range 0-255 in the default sRGB space.

Returns:
the blue component.
See Also:
getRGB()

getAlpha

public int getAlpha()
Enabled: Returns the alpha component in the range 0-255.

Returns:
the alpha component.
See Also:
getRGB()

getRGB

public int getRGB()
Enabled: Returns the RGB value representing the color in the default sRGB ColorModel. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue).

Returns:
the RGB value of the color in the default sRGB ColorModel.
Since:
JDK1.0
See Also:
java.awt.image.ColorModel#getRGBdefault, getRed(), getGreen(), getBlue()

brighter

public Color brighter()
Enabled: Creates a new Color that is a brighter version of this Color.

This method applies an arbitrary scale factor to each of the three RGB components of this Color to create a brighter version of this Color. Although brighter and darker are inverse operations, the results of a series of invocations of these two methods might be inconsistent because of rounding errors.

Returns:
a new Color object that is a brighter version of this Color.
Since:
JDK1.0
See Also:
java.awt.Color#darker

darker

public Color darker()
Enabled: Creates a new Color that is a darker version of this Color.

This method applies an arbitrary scale factor to each of the three RGB components of this Color to create a darker version of this Color. Although brighter and darker are inverse operations, the results of a series of invocations of these two methods might be inconsistent because of rounding errors.

Returns:
a new Color object that is a darker version of this Color.
Since:
JDK1.0
See Also:
java.awt.Color#brighter

hashCode

public int hashCode()
Suppressed: Computes the hash code for this Color.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
Since:
JDK1.0
See Also:
java.lang.Object#equals(java.lang.Object), java.util.Hashtable

equals

public boolean equals(Object obj)
Suppressed: Determines whether another object is equal to this Color.

The result is true if and only if the argument is not null and is a Color object that has the same red, green, blue, and alpha values as this object.

Overrides:
equals in class Object
Parameters:
obj - the object to test for equality with this Color
Returns:
true if the objects are the same; false otherwise.
Since:
JDK1.0
See Also:
Object.hashCode(), java.util.Hashtable

toString

public String toString()
Suppressed: Returns a string representation of this Color. This method is intended to be used only for debugging purposes. The content and format of the returned string might vary between implementations. The returned string might be empty but cannot be null.

Overrides:
toString in class Object
Returns:
a string representation of this Color.

decode

public static Color decode(String nm)
                    throws NumberFormatException
Enabled: Converts a String to an integer and returns the specified opaque Color. This method handles string formats that are used to represent octal and hexidecimal numbers.

Parameters:
nm - a String that represents an opaque color as a 24-bit integer
Returns:
the new Color object.
NumberFormatException
Since:
JDK1.1
See Also:
java.lang.Integer#decode

getColor

public static Color getColor(String nm)
Enabled: Finds a color in the system properties.

The argument is treated as the name of a system property to be obtained. The string value of this property is then interpreted as an integer which is then converted to a Color object.

If the specified property is not found or could not be parsed as an integer then null is returned.

Parameters:
nm - the name of the color property
Returns:
the Color converted from the system property.
Since:
JDK1.0
See Also:
java.lang.System#getProperty(java.lang.String), java.lang.Integer#getInteger(java.lang.String), java.awt.Color#Color(int)

getColor

public static Color getColor(String nm,
                             Color v)
Enabled: Finds a color in the system properties.

The first argument is treated as the name of a system property to be obtained. The string value of this property is then interpreted as an integer which is then converted to a Color object.

If the specified property is not found or cannot be parsed as an integer then the Color specified by the second argument is returned instead.

Parameters:
nm - the name of the color property
v - the default Color
Returns:
the Color converted from the system property, or the specified Color.
Since:
JDK1.0
See Also:
java.lang.System#getProperty(java.lang.String), java.lang.Integer#getInteger(java.lang.String), java.awt.Color#Color(int)

getColor

public static Color getColor(String nm,
                             int v)
Enabled: Finds a color in the system properties.

The first argument is treated as the name of a system property to be obtained. The string value of this property is then interpreted as an integer which is then converted to a Color object.

If the specified property is not found or could not be parsed as an integer then the integer value v is used instead, and is converted to a Color object.

Parameters:
nm - the name of the color property
v - the default color value, as an integer
Returns:
the Color converted from the system property or the Color converted from the specified integer.
Since:
JDK1.0
See Also:
java.lang.System#getProperty(java.lang.String), java.lang.Integer#getInteger(java.lang.String), java.awt.Color#Color(int)

HSBtoRGB

public static int HSBtoRGB(float hue,
                           float saturation,
                           float brightness)
Enabled: Converts the components of a color, as specified by the HSB model, to an equivalent set of values for the default RGB model.

The saturation and brightness components should be floating-point values between zero and one (numbers in the range 0.0-1.0). The hue component can be any floating-point number. The floor of this number is subtracted from it to create a fraction between 0 and 1. This fractional number is then multiplied by 360 to produce the hue angle in the HSB color model.

The integer that is returned by HSBtoRGB encodes the value of a color in bits 0-23 of an integer value that is the same format used by the method getRGB. This integer can be supplied as an argument to the Color constructor that takes a single integer argument.

Parameters:
hue - the hue component of the color
saturation - the saturation of the color
brightness - the brightness of the color
Returns:
the RGB value of the color with the indicated hue, saturation, and brightness.
Since:
JDK1.0
See Also:
java.awt.Color#getRGB(), java.awt.Color#Color(int), java.awt.image.ColorModel#getRGBdefault()

RGBtoHSB

public static float[] RGBtoHSB(int r,
                               int g,
                               int b,
                               float[] hsbvals)
Enabled: Converts the components of a color, as specified by the default RGB model, to an equivalent set of values for hue, saturation, and brightness that are the three components of the HSB model.

If the hsbvals argument is null, then a new array is allocated to return the result. Otherwise, the method returns the array hsbvals, with the values put into that array.

Parameters:
r - the red component of the color
g - the green component of the color
b - the blue component of the color
hsbvals - the array used to return the three HSB values, or null
Returns:
an array of three elements containing the hue, saturation, and brightness (in that order), of the color with the indicated red, green, and blue components.
Since:
JDK1.0
See Also:
java.awt.Color#getRGB(), java.awt.Color#Color(int), java.awt.image.ColorModel#getRGBdefault()

getHSBColor

public static Color getHSBColor(float h,
                                float s,
                                float b)
Enabled: Creates a Color object based on the specified values for the HSB color model.

The s and b components should be floating-point values between zero and one (numbers in the range 0.0-1.0). The h component can be any floating-point number. The floor of this number is subtracted from it to create a fraction between 0 and 1. This fractional number is then multiplied by 360 to produce the hue angle in the HSB color model.

Parameters:
h - the hue component
s - the saturation of the color
b - the brightness of the color
Returns:
a Color object with the specified hue, saturation, and brightness.
Since:
JDK1.0

getRGBComponents

public float[] getRGBComponents(float[] compArray)
Enabled: Returns a float array containing the color and alpha components of the Color, as represented in the default sRGB color space. If compArray is null, an array of length 4 is created for the return value. Otherwise, compArray must have length 4 or greater, and it is filled in with the components and returned.

Parameters:
compArray - an array that this method fills with color and alpha components and returns
Returns:
the RGBA components in a float array.

getRGBColorComponents

public float[] getRGBColorComponents(float[] compArray)
Enabled: Returns a float array containing only the color components of the Color, in the default sRGB color space. If compArray is null, an array of length 3 is created for the return value. Otherwise, compArray must have length 3 or greater, and it is filled in with the components and returned.

Parameters:
compArray - an array that this method fills with color components and returns
Returns:
the RGB components in a float array.

getComponents

public float[] getComponents(float[] compArray)
Enabled: Returns a float array containing the color and alpha components of the Color, in the ColorSpace of the Color. If compArray is null, an array with length equal to the number of components in the associated ColorSpace plus one is created for the return value. Otherwise, compArray must have at least this length and it is filled in with the components and returned.

Parameters:
compArray - an array that this method fills with the color and alpha components of this Color in its ColorSpace and returns
Returns:
the color and alpha components in a float array.

getColorComponents

public float[] getColorComponents(float[] compArray)
Enabled: Returns a float array containing only the color components of the Color, in the ColorSpace of the Color. If compArray is null, an array with length equal to the number of components in the associated ColorSpace is created for the return value. Otherwise, compArray must have at least this length and it is filled in with the components and returned.

Parameters:
compArray - an array that this method fills with the color components of this Color in its ColorSpace and returns
Returns:
the color components in a float array.

getComponents

public float[] getComponents(java.awt.color.ColorSpace cspace,
                             float[] compArray)
Enabled: Returns a float array containing the color and alpha components of the Color, in the ColorSpace specified by the cspace parameter. If compArray is null, an array with length equal to the number of components in cspace plus one is created for the return value. Otherwise, compArray must have at least this length, and it is filled in with the components and returned.

Parameters:
cspace - a specified ColorSpace
compArray - an array that this method fills with the color and alpha components of this Color in the specified ColorSpace and returns
Returns:
the color and alpha components in a float array.

getColorComponents

public float[] getColorComponents(java.awt.color.ColorSpace cspace,
                                  float[] compArray)
Enabled: Returns a float array containing only the color components of the Color in the ColorSpace specified by the cspace parameter. If compArray is null, an array with length equal to the number of components in cspace is created for the return value. Otherwise, compArray must have at least this length, and it is filled in with the components and returned.

Parameters:
cspace - a specified ColorSpace
compArray - an array that this method fills with the color components of this Color in the specified ColorSpace
Returns:
the color components in a float array.

getColorSpace

public java.awt.color.ColorSpace getColorSpace()
Enabled: Returns the ColorSpace of this Color.

Returns:
this Color object's ColorSpace.

createContext

public PaintContext createContext(java.awt.image.ColorModel cm,
                                  Rectangle r,
                                  java.awt.geom.Rectangle2D r2d,
                                  java.awt.geom.AffineTransform xform,
                                  RenderingHints hints)
Enabled: Creates and returns a PaintContext used to generate a solid color pattern. This enables a Color object to be used as an argument to any method requiring an object implementing the Paint interface. The same PaintContext is returned, regardless of whether or not r, r2d, xform, or hints are null.

Specified by:
createContext in interface Paint
Parameters:
cm - the specified ColorModel
r - the specified Rectangle
r2d - the specified Rectangle2D
xform - the specified AffineTransform
hints - the specified RenderingHints
Returns:
a PaintContext that is used to generate a solid color pattern.
See Also:
Paint, PaintContext, Graphics2D.setPaint(java.awt.Paint)

getTransparency

public int getTransparency()
Enabled: Returns the transparency mode for this Color. This is required to implement the Paint interface.

Specified by:
getTransparency in interface Transparency
Returns:
this Color object's transparency mode.
See Also:
Paint, Transparency, createContext(java.awt.image.ColorModel, java.awt.Rectangle, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform, java.awt.RenderingHints)


comments?