MetaDone
metadone.client.grasyla2.base.ColorEngine Class Reference
Collaboration diagram for metadone.client.grasyla2.base.ColorEngine:

List of all members.

Classes

class  StringColorAdaptor

Static Public Member Functions

static Color parseColor (final String strarg)
static Color getColorByName (String colorName)

Static Public Attributes

static final Logger logger = Logger.getLogger(ColorEngine.class)
static final Color COLOR_PROBLEM = Color.RED.brighter()
static final Color TRANSPARENT = new Color(0, true)

Static Private Attributes

static final Color DEFAULT_COLOR = new Color(0.4f, 0.4f, 0.4f)

Detailed Description

An engine that produces a color.

Author:
kma
See also:
StringColorAdaptor

Member Function Documentation

static Color metadone.client.grasyla2.base.ColorEngine.getColorByName ( String  colorName) [static]

Gets a color by its name from Color.

Parameters:
colorNameThe name of the color
Returns:
The color

Referenced by metadone.client.grasyla2.base.ColorEngine.parseColor().

static Color metadone.client.grasyla2.base.ColorEngine.parseColor ( final String  strarg) [static]

Parses a color from a string.

 COLOR := "rgb" "(" int ("," int){2,3} ")"
        | "#" (hex){3}
        | "#" (hex){6}
        | "#" (hex){8}
        | "transparent"
        | colorname
 int := [0-9]{1,3}
 hex := [0-9a-fA-F]
 
Parameters:
strThe string representing the color
Returns:
A color or null if there is a syntax error

References metadone.client.grasyla2.base.ColorEngine.COLOR_PROBLEM, metadone.client.grasyla2.base.ColorEngine.getColorByName(), metadone.client.grasyla2.base.ColorEngine.logger, and metadone.client.grasyla2.base.ColorEngine.TRANSPARENT.

Referenced by metadone.client.grasyla2.base.ColorEngine.StringColorAdaptor.adapt().


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations