Last Updated: 3/4/97
Class NFColor

Class NFColor

public class NFColor

This class defines a table of colors and returns the color object assigned to a given color name.

Colors may also be specified using a hexadecimal value in the range x000000 through xffffff. The leading "x" is mandatory.

The following color names are defined:

 	aliceblue	antiquewhite	aqua
 	aquamarine	azure		beige
 	bisque		black		blanchedalmond
 	blue		blueviolet	brown
 	burlywood	cadetblue	chartreuse
 	chocolate	coral		cornflowerblue
 	cornsilk	crimson		cyan
 	darkblue	darkcyan	darkgoldenrod
 	darkgray	darkgreen	darkkhaki
 	darkmagenta	darkolivegreen	darkorange
 	darkorchid	darkred		darksalmon
 	darkseagreen	darkslateblue	darkslategray
 	darkturquoise	darkviolet	deeppink
 	deepskyblue	dimgray		dodgerblue
 	firebrick	floralwhite	forestgreen
 	fuchsia		gainsboro	ghostwhite
 	gold		goldenrod	gray
 	green		greenyellow	honeydew
 	hotpink		indianred	indigo
 	ivory		khaki		lavender
 	lavenderblush	lawngreen	lemonchiffon
 	lightblue	lightcoral	lightcyan
 	lightgoldenrodyellow		
 	lightgreen	lightgrey
 	lightpink	lightsalmon	lightseagreen
 	lightskyblue	lightslategray	lightsteelblue
 	lightyellow	lime		limegreen
 	linen		magenta		maroon
 	mediumaquamarine
 	mediumblue	mediumorchid	mediumpurple
 	mediumseagreen	mediumslateblue mediumspringgreen	
 	mediumturquoise	mediumvioletred
 	midnightblue	mintcream	mistyrose
 	moccasin	navajowhite	navy
 	oldlace		olive		olivedrab
 	orange		orangered	orchid
 	palegoldenrod	palegreen	paleturquoise
 	palevioletred	papayawhip	peachpuff
 	peru		pink		plum
 	powderblue	purple		red
 	rosybrown	royalblue	saddlebrown
 	salmon		sandybrown	seagreen
 	seashell	sienna		silver
 	skyblue		slateblue	slategray
 	snow		springgreen	steelblue
 	tan		teal		thistle
 	tomato		turquoise	violet
 	wheat		white		whitesmoke
 	yellow		yellowgreen

Constructors

Methods


NFColor ()
Create a symbol table for colors

static Color get (String colorName)
Returns the color object associated with the given name. If the string looks like "x000000", then return the color associated with the hexadecimal value given.
If an error occurs, a null value is returned.

Color getDefaultColor (int i)
Return a default color from the color table, if defined, or from the system default color table.

void setDefaultTable (Vector v)
Set the default color table to the given vector of Color objects

static String toString (Color color)
Returns the colorname associated with the given color. If not found, a hexadecimal string representing the color will be returned.