ewe.fx
Class Color

java.lang.Object
  extended byewe.fx.Color

public class Color
extends Object

Color represents a color.

A color is defined as a mixture of red, green and blue color values. Each value is in the range of 0 to 255 where 0 is darkest and 255 is brightest. For example, Color(255, 0, 0) is the color red.

Here are some more examples:


Field Summary
static Color Black
           
static Color DarkBlue
           
static Color DarkGray
           
static Color LightBlue
           
static Color LighterGray
           
static Color LightGray
           
static Color LightGreen
           
static Color MediumBlue
           
static Color Null
           
static Color Pink
           
static Color Sand
           
static Color White
           
 
Constructor Summary
Color(int red, int green, int blue)
          Constructs a color object with the given red, green and blue values.
Color(int red, int green, int blue, int alpha)
           
 
Method Summary
 boolean equals(Object other)
          Returns if this object is considered equal to the other object.
 void fromInt(int value)
           
 int getAlpha()
           
 int getBlue()
          Returns the blue value of the color.
 Color getCopy()
           
 int getGreen()
          Returns the green value of the color.
static boolean getMonochrome()
           
 int getRed()
          Returns the red value of the color.
 boolean isNull()
           
static boolean isNull(Color c)
           
 void set(Color other)
           
 void set(int r, int g, int b)
           
 void set(int r, int g, int b, int a)
           
static void setMonochrome(boolean mono)
           
 void setNull(boolean set)
           
 int toInt()
           
 Color toOpaque()
           
 String toString()
          Return a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode
 

Field Detail

Null

public static final Color Null

Black

public static Color Black

White

public static Color White

DarkGray

public static Color DarkGray

LightGray

public static Color LightGray

LighterGray

public static Color LighterGray

DarkBlue

public static Color DarkBlue

Sand

public static Color Sand

LightBlue

public static Color LightBlue

MediumBlue

public static Color MediumBlue

LightGreen

public static Color LightGreen

Pink

public static Color Pink
Constructor Detail

Color

public Color(int red,
             int green,
             int blue)
Constructs a color object with the given red, green and blue values.

Parameters:
red - the red value in the range of 0 to 255
green - the green value in the range of 0 to 255
blue - the blue value in the range of 0 to 255

Color

public Color(int red,
             int green,
             int blue,
             int alpha)
Method Detail

setNull

public void setNull(boolean set)

isNull

public boolean isNull()

isNull

public static boolean isNull(Color c)

getBlue

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


getGreen

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


getRed

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


getAlpha

public int getAlpha()

setMonochrome

public static void setMonochrome(boolean mono)

getMonochrome

public static boolean getMonochrome()

set

public void set(int r,
                int g,
                int b)

set

public void set(int r,
                int g,
                int b,
                int a)

set

public void set(Color other)

toString

public String toString()
Description copied from class: Object
Return a String representation of this object.

Overrides:
toString in class Object
Returns:
a String representing this object.

equals

public boolean equals(Object other)
Description copied from class: Object
Returns if this object is considered equal to the other object.

Overrides:
equals in class Object
Parameters:
other - Another object to compare to.
Returns:
true if this object is considered equal to the other object.

toInt

public int toInt()

fromInt

public void fromInt(int value)

toOpaque

public Color toOpaque()

getCopy

public Color getCopy()