yu.ac.bg.etf.javaqx.qswing.graphics
Class Color

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.qswing.graphics.Paint
      extended byyu.ac.bg.etf.javaqx.qswing.graphics.Color

public class Color
extends Paint

Color Class.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
static Color BLACK
          The black color.
static Color BLUE
          The blue color.
static Color CYAN
          The cyan color.
static Color DARK_BLUE
          The dark blue color.
static Color DARK_CYAN
          The dark cyan color.
static Color DARK_GRAY
          The dark gray color.
static Color DARK_GREEN
          The dark green color.
static Color DARK_MAGENTA
          The dark magenta color.
static Color DARK_RED
          The dark red color.
static Color DARK_YELLOW
          The dark yellow color.
static Color GRAY
          The gray color.
static Color GREEN
          The green color.
static Color LIGHT_GRAY
          The light gray color.
static Color MAGENTA
          The magenta color.
static Color ORANGE
          The orange color.
static Color PINK
          The pink color.
static Color RED
          The red color.
static Color WHITE
          The white color.
static Color YELLOW
          The yellow color.
 
Constructor Summary
Color(int argb)
          Constructs new Color object.
Color(int r, int g, int b)
          Constructs new Color object.
Color(int r, int g, int b, int a)
          Constructs new Color object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 int getAlpha()
          Returns the alpha component of the color.
 int getARGB()
          Returns the ARGB value representing the color.
 int getBlue()
          Returns the blue component of the color.
 int getGreen()
          Returns the green component of the color.
 int getRed()
          Returns the red component of the color.
 int getRGB()
          Returns the RGB value representing the color.
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

WHITE

public static final Color WHITE
The white color.


LIGHT_GRAY

public static final Color LIGHT_GRAY
The light gray color.


GRAY

public static final Color GRAY
The gray color.


DARK_GRAY

public static final Color DARK_GRAY
The dark gray color.


BLACK

public static final Color BLACK
The black color.


RED

public static final Color RED
The red color.


DARK_RED

public static final Color DARK_RED
The dark red color.


PINK

public static final Color PINK
The pink color.


ORANGE

public static final Color ORANGE
The orange color.


YELLOW

public static final Color YELLOW
The yellow color.


DARK_YELLOW

public static final Color DARK_YELLOW
The dark yellow color.


GREEN

public static final Color GREEN
The green color.


DARK_GREEN

public static final Color DARK_GREEN
The dark green color.


MAGENTA

public static final Color MAGENTA
The magenta color.


DARK_MAGENTA

public static final Color DARK_MAGENTA
The dark magenta color.


CYAN

public static final Color CYAN
The cyan color.


DARK_CYAN

public static final Color DARK_CYAN
The dark cyan color.


BLUE

public static final Color BLUE
The blue color.


DARK_BLUE

public static final Color DARK_BLUE
The dark blue color.

Constructor Detail

Color

public Color(int argb)
Constructs new Color object.

Parameters:
argb - the argb value of the color

Color

public Color(int r,
             int g,
             int b)
Constructs new Color object.

Parameters:
r - the red component of the color
g - the green component of the color
b - the blue component of the color

Color

public Color(int r,
             int g,
             int b,
             int a)
Constructs new Color object.

Parameters:
r - the red component of the color
g - the green component of the color
b - the blue component of the color
a - the alpha component of the color
Method Detail

getAlpha

public int getAlpha()
Returns the alpha component of the color.

Returns:
the alpha component of the color

getRed

public int getRed()
Returns the red component of the color.

Returns:
the red component of the color

getGreen

public int getGreen()
Returns the green component of the color.

Returns:
the green component of the color

getBlue

public int getBlue()
Returns the blue component of the color.

Returns:
the blue component of the color

getRGB

public int getRGB()
Returns the RGB value representing the color.

Returns:
the RGB value representing the color

getARGB

public int getARGB()
Returns the ARGB value representing the color.

Returns:
the ARGB value representing the color

equals

public boolean equals(java.lang.Object obj)


hashCode

public int hashCode()


toString

public java.lang.String toString()



Copyright © 2007 ETF and contributors. All Rights Reserved.