javax.swing.plaf.synth

Class ColorType

public class ColorType extends Object

A typesafe enumeration of color types.

Since: 1.5

Field Summary
static ColorTypeBACKGROUND
A constant used to identify the background color of a component.
static ColorTypeFOCUS
A constant used to identify the focus color of a component.
static ColorTypeFOREGROUND
A constant used to identify the foreground color of a component.
static intMAX_COUNT
The maximum number of color types.
static ColorTypeTEXT_BACKGROUND
A constant used to identify the background color of text of a component.
static ColorTypeTEXT_FOREGROUND
A constant used to identify the foreground color of text of a component.
Constructor Summary
protected ColorType(String desc)
Creates a new Color color type with the specified description.
Method Summary
intgetID()
Returns the unique ID of the color type.
StringtoString()
Returns the textual description of the color type.

Field Detail

BACKGROUND

public static final ColorType BACKGROUND
A constant used to identify the background color of a component.

FOCUS

public static final ColorType FOCUS
A constant used to identify the focus color of a component.

FOREGROUND

public static final ColorType FOREGROUND
A constant used to identify the foreground color of a component.

MAX_COUNT

public static final int MAX_COUNT
The maximum number of color types.

TEXT_BACKGROUND

public static final ColorType TEXT_BACKGROUND
A constant used to identify the background color of text of a component.

TEXT_FOREGROUND

public static final ColorType TEXT_FOREGROUND
A constant used to identify the foreground color of text of a component.

Constructor Detail

ColorType

protected ColorType(String desc)
Creates a new Color color type with the specified description.

Parameters: desc the textual description of the color type

Method Detail

getID

public final int getID()
Returns the unique ID of the color type.

Returns: the unique ID of the color type

toString

public String toString()
Returns the textual description of the color type.

Returns: the textual description of the color type