Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class Color

java.lang.Object
  extended by com.aspose.cells.Color
All Implemented Interfaces:
java.lang.Cloneable

public final class Color
extends java.lang.Object
implements java.lang.Cloneable

Represents a color which contains three, 8-bit components: red, green, and blue.


Field Summary
static Color BLACK
          The color black.
static Color BLUE
          The color blue.
static Color CYAN
          The color cyan.
static Color GRAY
          The color gray.
static Color GREEN
          The color green.
static Color LIME
          The color lime.
static Color MAGENTA
          The color magenta.
static Color MAROON
          The color maroon.
static Color NAVY
          The color navy.
static Color OLIVE
          The color oliver.
static Color PURPLE
          The color purple.
static Color RED
          The color red.
static Color SILVER
          The color silver.
static Color TEAL
          The color teal.
static Color WHITE
          The color white.
static Color YELLOW
          The color yellow.
 
Constructor Summary
Color()
          Initializes a new instance of the Color class.
Color(int red, int green, int blue)
          Initializes a new instance of the Color class.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 void copy(Color color)
          Copies component values from another color.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 int getBlue()
          Gets the blue component value.
 int getGreen()
          Gets the green component value.
 int getRed()
          Gets the red component value.
 int hashCode()
          Returns a hash code value for the object.
 boolean isAuto()
          Indicates whether the color is automatic color.
 void setBlue(int blue)
          Sets the blue component value.
 void setGreen(int green)
          Sets the green component value.
 void setRed(int red)
          Sets the red component value.
 java.lang.String toString()
          Converts this Color object to a human-readable string.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BLACK

public static final Color BLACK
The color black.


WHITE

public static final Color WHITE
The color white.


RED

public static final Color RED
The color red.


LIME

public static final Color LIME
The color lime.


BLUE

public static final Color BLUE
The color blue.


YELLOW

public static final Color YELLOW
The color yellow.


MAGENTA

public static final Color MAGENTA
The color magenta.


CYAN

public static final Color CYAN
The color cyan.


MAROON

public static final Color MAROON
The color maroon.


GREEN

public static final Color GREEN
The color green.


NAVY

public static final Color NAVY
The color navy.


OLIVE

public static final Color OLIVE
The color oliver.


PURPLE

public static final Color PURPLE
The color purple.


TEAL

public static final Color TEAL
The color teal.


SILVER

public static final Color SILVER
The color silver.


GRAY

public static final Color GRAY
The color gray.

Constructor Detail

Color

public Color(int red,
             int green,
             int blue)
Initializes a new instance of the Color class.

Parameters:
red - the red component value(0-255).
green - the green component value(0-255).
blue - the blue component value(0-255).
Throws:
java.lang.IllegalArgumentException - if any of the component values is invalid.

Color

public Color()
Initializes a new instance of the Color class. All color componets is zero.

Method Detail

clone

public final java.lang.Object clone()
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object
See Also:
Object.clone().

toString

public java.lang.String toString()
Converts this Color object to a human-readable string.

Overrides:
toString in class java.lang.Object

copy

public final void copy(Color color)
Copies component values from another color.

Parameters:
color - the color to copy from.

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(Object).

hashCode

public final int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode().

getRed

public final int getRed()
Gets the red component value.

Returns:
the red component value.

setRed

public final void setRed(int red)
Sets the red component value.

Parameters:
red - the red component value(0-255).
Throws:
java.lang.IllegalArgumentException - if the component value is invalid.

getGreen

public final int getGreen()
Gets the green component value.

Returns:
the green component value.

setGreen

public final void setGreen(int green)
Sets the green component value.

Parameters:
green - the green component value(0-255).
Throws:
java.lang.IllegalArgumentException - if the component value is invalid.

getBlue

public final int getBlue()
Gets the blue component value.

Returns:
the blue component value.

setBlue

public final void setBlue(int blue)
Sets the blue component value.

Parameters:
blue - the blue component value(0-255).
Throws:
java.lang.IllegalArgumentException - if the component value is invalid.

isAuto

public boolean isAuto()
Indicates whether the color is automatic color.

Returns:
whether the color is automatic color.