com.steema.teechart.drawing
Class Color

java.lang.Object
  extended by com.steema.teechart.drawing.Color
Direct Known Subclasses:
SystemColor

public class Color
extends java.lang.Object

Title: Color class

Description:

Copyright (c) 2005-2012 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL


Field Summary
static Color aqua
          The color aqua.
static Color AQUA
          The color aqua.
static Color bisque
          The color bisque.
static Color BISQUE
          The color bisque.
static Color black
          The color black.
static Color BLACK
          The color black.
static Color blue
          The color blue.
static Color BLUE
          The color blue.
static Color cyan
          The color cyan.
static Color CYAN
          The color cyan.
static Color DARK_GRAY
          The color dark gray.
static Color darkGray
          The color dark gray.
static Color EMPTY
           
static Color fuchsia
          The color fuchsia.
static Color FUCHSIA
          The color fuchsia.
static Color gold
          The color gold.
static Color GOLD
          The color gold.
static Color gray
          The color gray.
static Color GRAY
          The color gray.
static Color green
          The color green.
static Color GREEN
          The color green.
static Color GREEN_YELLOW
          The color green yellow.
static Color greenYellow
          The color green yellow.
static Color indigo
          The color indigo.
static Color INDIGO
          The color indigo.
static Color LIGHT_YELLOW
          The color light yellow.
static Color lightGray
           
static Color lightYellow
          The color light yellow.
static Color lime
          The color lime.
static Color LIME
          The color lime.
static Color magenta
          The color magenta.
static Color MAGENTA
          The color magenta.
static Color maroon
          The color maroon.
static Color MAROON
          The color maroon.
static Color navy
          The color navy.
static Color NAVY
          The color navy.
static Color olive
          The color olive.
static Color OLIVE
          The color olive.
static Color orange
          The color orange.
static Color ORANGE
          The color orange.
static Color pink
          The color pink.
static Color PINK
          The color pink.
static Color purple
          The color purple.
static Color PURPLE
          The color purple.
static Color red
          The color red.
static Color RED
          The color red.
static Color silver
          The color silver.
static Color SILVER
          The color silver.
static Color SKY_BLUE
          The color sky blue.
static Color skyBlue
          The color sky blue.
static Color teal
          The color teal.
static Color TEAL
          The color teal.
static Color transparent
           
static Color TRANSPARENT
           
static Color white
          The color white.
static Color WHITE
          The color white.
static Color WHITE_SMOKE
          The color white smoke.
static Color whiteSmoke
          The color white smoke.
static Color yellow
          The color yellow.
static Color YELLOW
          The color yellow.
 
Constructor Summary
Color()
           
Color(Color value)
           
Color(int value)
           
Color(int r, int g, int b)
           
Color(int r, int g, int b, int alpha)
           
 
Method Summary
 Color applyBright(int howMuch)
          Converts the Color parameter to a brighter color.
 Color applyDark(int howMuch)
          Converts the Color parameter to a darker color.
static Color fromArgb(int value)
           
static Color fromArgb(int r, int g, int b)
           
static Color fromArgb(int a, int r, int g, int b)
           
 int getAlpha()
           
 int getBlue()
           
 boolean getEmpty()
          Returns true when the Color equals to EMPTY color.
 int getGreen()
           
 boolean getNone()
           
 int getRed()
           
 int getRGB()
           
 boolean isEmpty()
           
 boolean isNull()
           
static Color random()
          Creates a new Color instance with random RED, GREEN and BLUE color components.
 void setEmpty(boolean value)
           
 void setNone(boolean value)
           
static int transparencyOf(Color value)
          Returns an integer from 0 to 100 that is the percent of transparency of this color.
 Color transparentColor(int value)
          Returns Color with transparency percentage applied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final Color EMPTY

transparent

public static final Color transparent

TRANSPARENT

public static final Color TRANSPARENT

black

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


BLACK

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


darkGray

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


DARK_GRAY

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


yellow

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


YELLOW

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


red

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


RED

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


green

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


GREEN

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


blue

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


BLUE

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


silver

public static final Color silver
The color silver. In the default sRGB space.


SILVER

public static final Color SILVER
The color silver. In the default sRGB space.


gray

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


GRAY

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


white

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


WHITE

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


whiteSmoke

public static final Color whiteSmoke
The color white smoke. In the default sRGB space.


WHITE_SMOKE

public static final Color WHITE_SMOKE
The color white smoke. In the default sRGB space.


navy

public static final Color navy
The color navy. In the default sRGB space.


NAVY

public static final Color NAVY
The color navy. In the default sRGB space.


gold

public static final Color gold
The color gold. In the default sRGB space.


GOLD

public static final Color GOLD
The color gold. In the default sRGB space.


lightYellow

public static final Color lightYellow
The color light yellow. In the default sRGB space.


LIGHT_YELLOW

public static final Color LIGHT_YELLOW
The color light yellow. In the default sRGB space.


fuchsia

public static final Color fuchsia
The color fuchsia. In the default sRGB space.


FUCHSIA

public static final Color FUCHSIA
The color fuchsia. In the default sRGB space.


teal

public static final Color teal
The color teal. In the default sRGB space.


TEAL

public static final Color TEAL
The color teal. In the default sRGB space.


maroon

public static final Color maroon
The color maroon. In the default sRGB space.


MAROON

public static final Color MAROON
The color maroon. In the default sRGB space.


lime

public static final Color lime
The color lime. In the default sRGB space.


LIME

public static final Color LIME
The color lime. In the default sRGB space.


olive

public static final Color olive
The color olive. In the default sRGB space.


OLIVE

public static final Color OLIVE
The color olive. In the default sRGB space.


purple

public static final Color purple
The color purple. In the default sRGB space.


PURPLE

public static final Color PURPLE
The color purple. In the default sRGB space.


aqua

public static final Color aqua
The color aqua. In the default sRGB space.


AQUA

public static final Color AQUA
The color aqua. In the default sRGB space.


greenYellow

public static final Color greenYellow
The color green yellow. In the default sRGB space.


GREEN_YELLOW

public static final Color GREEN_YELLOW
The color green yellow. In the default sRGB space.


skyBlue

public static final Color skyBlue
The color sky blue. In the default sRGB space.


SKY_BLUE

public static final Color SKY_BLUE
The color sky blue. In the default sRGB space.


bisque

public static final Color bisque
The color bisque. In the default sRGB space.


BISQUE

public static final Color BISQUE
The color bisque. In the default sRGB space.


indigo

public static final Color indigo
The color indigo. In the default sRGB space.


INDIGO

public static final Color INDIGO
The color indigo. In the default sRGB space.


pink

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


PINK

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


orange

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


ORANGE

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


magenta

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


MAGENTA

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


cyan

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


CYAN

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


lightGray

public static final Color lightGray
Constructor Detail

Color

public Color()

Color

public Color(int r,
             int g,
             int b,
             int alpha)

Color

public Color(int r,
             int g,
             int b)

Color

public Color(int value)

Color

public Color(Color value)
Method Detail

isEmpty

public boolean isEmpty()

getEmpty

public boolean getEmpty()
Returns true when the Color equals to EMPTY color.
EMPTY Color means objects will not fill drawing elements.

Returns:
Color

setEmpty

public void setEmpty(boolean value)

isNull

public boolean isNull()

getNone

public boolean getNone()

setNone

public void setNone(boolean value)

fromArgb

public static Color fromArgb(int value)

fromArgb

public static Color fromArgb(int a,
                             int r,
                             int g,
                             int b)

fromArgb

public static Color fromArgb(int r,
                             int g,
                             int b)

random

public static Color random()
Creates a new Color instance with random RED, GREEN and BLUE color components.

Returns:
Color

transparentColor

public Color transparentColor(int value)
Returns Color with transparency percentage applied.

Parameters:
value - int
Returns:
Color with transparency percentage applied.

transparencyOf

public static int transparencyOf(Color value)
Returns an integer from 0 to 100 that is the percent of transparency of this color.

Parameters:
value - Color
Returns:
int
See Also:
transparentColor(int), java.awt.Color#getAlpha

applyDark

public Color applyDark(int howMuch)
Converts the Color parameter to a darker color.
The HowMuch parameter indicates the quantity of dark increment.
It is used by Bar Series and Pie Series to calculate the right color t to draw Bar sides and Pie 3D zones.

Parameters:
howMuch - int
Returns:
Color

applyBright

public Color applyBright(int howMuch)
Converts the Color parameter to a brighter color.
The HowMuch parameter indicates the quantity of bright increment.
It is used by Styles.Bar Series and Styles.Pie Series to calculate the right color to draw Bar sides and Pie 3D zones.

Parameters:
howMuch - int
Returns:
Color

getRGB

public int getRGB()

getAlpha

public int getAlpha()

getRed

public int getRed()

getGreen

public int getGreen()

getBlue

public int getBlue()