LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.misc
Class LyColor

java.lang.Object
  extended by leon.misc.LyColor

public final class LyColor
extends java.lang.Object

The LyColor class is used encapsulate colors as RGB format.


Field Summary
static java.lang.String __VERSION
           
static LyColor BLACK
          The black color.
static LyColor BLUE
          The blue color.
static LyColor CYAN
          The cyan color.
static LyColor DARK_GRAY
          The dark gray color.
static LyColor GRAY
          The gray color.
static LyColor GREEN
          The green color.
static LyColor LIGHT_GRAY
          The light gray color.
static LyColor MAGENTA
          The magenta color.
static LyColor NO_COLOR
          No color.
static LyColor ORANGE
          The orange color.
static LyColor PINK
          The pink color.
static LyColor RED
          The red color.
static LyColor SYSTEM
          The system color.
static LyColor WHITE
          The white color.
static LyColor YELLOW
          The yellow color.
 
Constructor Summary
LyColor()
          Creates a default system color.
LyColor(int value)
          Creates an opaque RGB color.
LyColor(int r, int g, int b)
          Creates an opaque RGB color with the specified red, green, and blue values in the range (0 - 255).
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getBlue()
          Gets the blue component in the range 0-255.
 int getGreen()
          Gets the green component in the range 0-255.
 int getRed()
          Gets the red component in the range 0-255.
 int getRGB()
          Gets the RGB value representing the color (Bits 16-23 are red, 8-15 are green, 0-7 are blue).
 int hashCode()
           
 java.lang.String toString()
           
 boolean useSystemColor()
          This method is used by components that need to know if they should use the system color.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

SYSTEM

public static final LyColor SYSTEM
The system color.


WHITE

public static final LyColor WHITE
The white color.


LIGHT_GRAY

public static final LyColor LIGHT_GRAY
The light gray color.


GRAY

public static final LyColor GRAY
The gray color.


DARK_GRAY

public static final LyColor DARK_GRAY
The dark gray color.


BLACK

public static final LyColor BLACK
The black color.


RED

public static final LyColor RED
The red color.


PINK

public static final LyColor PINK
The pink color.


ORANGE

public static final LyColor ORANGE
The orange color.


YELLOW

public static final LyColor YELLOW
The yellow color.


GREEN

public static final LyColor GREEN
The green color.


MAGENTA

public static final LyColor MAGENTA
The magenta color.


CYAN

public static final LyColor CYAN
The cyan color.


BLUE

public static final LyColor BLUE
The blue color.


NO_COLOR

public static final LyColor NO_COLOR
No color.

Constructor Detail

LyColor

public LyColor(int r,
               int g,
               int b)
Creates an opaque RGB color with the specified red, green, and blue values in the range (0 - 255).

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

LyColor

public LyColor(int value)
Creates an opaque RGB color. Inilializes _value with the specified value and _systemColor to false.

Parameters:
value - the RGB value
See Also:
getRGB()

LyColor

public LyColor()
Creates a default system color. Initializes _value to 0 and _systemColor to true.

Method Detail

getRGB

public int getRGB()
Gets the RGB value representing the color (Bits 16-23 are red, 8-15 are green, 0-7 are blue).

Returns:
the RGB value of the color.
See Also:
getRed(), getGreen(), getBlue()

getRed

public int getRed()
Gets the red component in the range 0-255.

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

getGreen

public int getGreen()
Gets the green component in the range 0-255.

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

getBlue

public int getBlue()
Gets the blue component in the range 0-255.

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

useSystemColor

public boolean useSystemColor()
This method is used by components that need to know if they should use the system color.

Returns:
true if the asker of the color should use a system color

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com