Color.getColor

Color.getColor

Class Overview | Class Members | This Package | All Packages

Syntax 1
public static Color getColor( String nm )
Parameters
nm
the name of the color property
Returns
the color value of the property.
Description
Finds a color in the system properties.

The argument is treated as the name of a system property to be obtained. The string value of this property is then interpreted as an integer which is then converted to a color.

If the specified property is not found, or could not be parsed as an integer, then null is returned.

See Also
getProperty, getInteger, Color



Syntax 2
public static Color getColor( String nm, Color v )
Parameters
nm
the name of the color property
v
the default color value.
Returns
the color value of the property.
Description
Finds a color in the system properties.

The first argument is treated as the name of a system property to be obtained. The string value of this property is then interpreted as an integer which is then converted to a color.

If the specified property is not found, or cannot be parsed as an integer, then the color specified by the second argument is returned instead.

See Also
getProperty, getInteger, Color



Syntax 3
public static Color getColor( String nm, int v )
Parameters
nm
the name of the color property.
v
the default color value, as an integer.
Returns
the color value of the property.
Description
Finds a color in the system properties.

The first argument is treated as the name of a system property to be obtained. The string value of this property is then interpreted as an integer which is then converted to a color.

If the specified property is not found, or could not be parsed as an integer, then the integer value v is used instead, and is converted to a color.

See Also
getProperty, getInteger, Color