net.sf.ecl.datepicker.resources
Class Colors

java.lang.Object
  extended by net.sf.ecl.datepicker.resources.Colors

public final class Colors
extends Object

A color registry with ability to cache requested colors. The colors acquired from this class are disposed on release of the default Display instance.

Author:
Alexey Afanasyev, Alexey Kharlamov

Method Summary
static Color darker(Color source, double percent)
           
static Color getBlack()
          Returns the default color black.
static Color getBlue()
          Returns the default color blue.
static Color getColor(int red, int green, int blue)
          Returns a cached color for the given red, green and blue values.
static Color getColor(RGB rgb)
          Returns a cached color for the given RGB describing the desired red, green and blue values.
static Color getCyan()
          Returns the default color cyan.
static Color getDarkBlue()
          Returns the default color dark blue.
static Color getDarkCyan()
          Returns the default color dark cyan.
static Color getDarkGray()
          Returns the default color dark gray.
static Color getDarkGreen()
          Returns the default color dark green.
static Color getDarkMagenta()
          Returns the default color dark magenta.
static Color getDarkRed()
          Returns the default color dark red.
static Color getDarkYellow()
          Returns the default color dark yellow.
static Color getGray()
          Returns the default color gray.
static Color getGreen()
          Returns the default color green.
static Color getInfoBackground()
          Returns the system color used to paint tooltip background areas.
static Color getInfoForeground()
          Returns the system color used to paint tooltip text.
static Color getListBackground()
          Returns the system color used to paint list background areas.
static Color getListForeground()
          Returns the system color used to paint list foreground areas.
static Color getListSelection()
          Returns the system color used to paint list selection background areas.
static Color getListSelectionText()
          Returns the system color used to paint list selected text.
static Color getMagenta()
          Returns the default color magenta.
static Color getRed()
          Returns the default color red.
static Color getSystemColor(int colorId)
          Returns a cached system color for the given id.
static Color getTitleBackground()
          Returns the system color used to paint title background areas.
static Color getTitleBackgroundGradient()
          Returns the system color used to paint title background gradient.
static Color getTitleForeground()
          Returns the system color used to paint title text.
static Color getTitleInactiveBackground()
          Returns the system color used to paint inactive title background areas.
static Color getTitleInactiveBackgroundGradient()
          Returns the system color used to paint inactive title background gradient.
static Color getTitleInactiveForeground()
          Returns the system color used to paint inactive title text.
static Color getWhite()
          Returns the default color white.
static Color getWidgetBackground()
          Returns the system color used to paint background areas.
static Color getWidgetBorder()
          Returns the system color used to paint border areas.
static Color getWidgetDarkShadow()
          Returns the system color used to paint dark shadow areas.
static Color getWidgetForeground()
          Returns the system color used to paint foreground areas.
static Color getWidgetHighlightShadow()
          Returns the system color used to paint highlight shadow areas.
static Color getWidgetLightShadow()
          Returns the system color used to paint light shadow areas.
static Color getWidgetNormalShadow()
          Returns the system color used to paint normal shadow areas.
static Color getYellow()
          Returns the default color yellow.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

darker

public static Color darker(Color source,
                           double percent)
Parameters:
source -
percent -
Returns:

getBlack

public static Color getBlack()
Returns the default color black.

Returns:
the default color black

getBlue

public static Color getBlue()
Returns the default color blue.

Returns:
the default color blue

getColor

public static Color getColor(int red,
                             int green,
                             int blue)
Returns a cached color for the given red, green and blue values.

Parameters:
red - the red component
green - the green component
blue - the blue component
Returns:
the desired color

getColor

public static Color getColor(RGB rgb)
Returns a cached color for the given RGB describing the desired red, green and blue values.

Parameters:
rgb - the RGB values of the desired color
Returns:
the desired color

getCyan

public static Color getCyan()
Returns the default color cyan.

Returns:
the default color cyan

getDarkBlue

public static Color getDarkBlue()
Returns the default color dark blue.

Returns:
the default color dark blue

getDarkCyan

public static Color getDarkCyan()
Returns the default color dark cyan.

Returns:
the default color dark cyan

getDarkGray

public static Color getDarkGray()
Returns the default color dark gray.

Returns:
the default color dark gray

getDarkGreen

public static Color getDarkGreen()
Returns the default color dark green.

Returns:
the default color dark green

getDarkMagenta

public static Color getDarkMagenta()
Returns the default color dark magenta.

Returns:
the default color dark magenta

getDarkRed

public static Color getDarkRed()
Returns the default color dark red.

Returns:
the default color dark red

getDarkYellow

public static Color getDarkYellow()
Returns the default color dark yellow.

Returns:
the default color dark yellow

getGray

public static Color getGray()
Returns the default color gray.

Returns:
the default color gray

getGreen

public static Color getGreen()
Returns the default color green.

Returns:
the default color green

getInfoBackground

public static Color getInfoBackground()
Returns the system color used to paint tooltip background areas.

Returns:
the desired color

getInfoForeground

public static Color getInfoForeground()
Returns the system color used to paint tooltip text.

Returns:
the desired color

getListBackground

public static Color getListBackground()
Returns the system color used to paint list background areas.

Returns:
the desired color

getListForeground

public static Color getListForeground()
Returns the system color used to paint list foreground areas.

Returns:
the desired color

getListSelection

public static Color getListSelection()
Returns the system color used to paint list selection background areas.

Returns:
the desired color

getListSelectionText

public static Color getListSelectionText()
Returns the system color used to paint list selected text.

Returns:
the desired color

getMagenta

public static Color getMagenta()
Returns the default color magenta.

Returns:
the default color magenta

getRed

public static Color getRed()
Returns the default color red.

Returns:
the default color red

getSystemColor

public static Color getSystemColor(int colorId)
Returns a cached system color for the given id.

Parameters:
colorId - the color id
Returns:
the desired color

getTitleBackground

public static Color getTitleBackground()
Returns the system color used to paint title background areas.

Returns:
the desired color

getTitleBackgroundGradient

public static Color getTitleBackgroundGradient()
Returns the system color used to paint title background gradient.

Returns:
the desired color

getTitleForeground

public static Color getTitleForeground()
Returns the system color used to paint title text.

Returns:
the desired color

getTitleInactiveBackground

public static Color getTitleInactiveBackground()
Returns the system color used to paint inactive title background areas.

Returns:
the desired color

getTitleInactiveBackgroundGradient

public static Color getTitleInactiveBackgroundGradient()
Returns the system color used to paint inactive title background gradient.

Returns:
the desired color

getTitleInactiveForeground

public static Color getTitleInactiveForeground()
Returns the system color used to paint inactive title text.

Returns:
the desired color

getWhite

public static Color getWhite()
Returns the default color white.

Returns:
the default color white

getWidgetBackground

public static Color getWidgetBackground()
Returns the system color used to paint background areas.

Returns:
the desired color

getWidgetBorder

public static Color getWidgetBorder()
Returns the system color used to paint border areas.

Returns:
the desired color

getWidgetDarkShadow

public static Color getWidgetDarkShadow()
Returns the system color used to paint dark shadow areas.

Returns:
the desired color

getWidgetForeground

public static Color getWidgetForeground()
Returns the system color used to paint foreground areas.

Returns:
the desired color

getWidgetHighlightShadow

public static Color getWidgetHighlightShadow()
Returns the system color used to paint highlight shadow areas.

Returns:
the desired color

getWidgetLightShadow

public static Color getWidgetLightShadow()
Returns the system color used to paint light shadow areas.

Returns:
the desired color

getWidgetNormalShadow

public static Color getWidgetNormalShadow()
Returns the system color used to paint normal shadow areas.

Returns:
the desired color

getYellow

public static Color getYellow()
Returns the default color yellow.

Returns:
the default color yellow