All Packages  Class Hierarchy  This Package  Previous  Next  Index


Class jclass.contrib.JCColorUtil

java.lang.Object
   |
   +----jclass.contrib.JCColorUtil


public class JCColorUtil
extends Object

The JCColorUtil class contains a collection of color-related utilities for applications.


Variable Index

 o colors
An array of default colors.
 o colorStrings
An array of color strings matching the default colors.

Constructor Index

 o JCColorUtil()

Method Index

 o colorIndex(Color)
When provided with an instance of an AWT Color object, this returns the index in the colors array that matches the color.
 o colorToString(Color)
When provided with an instance of an AWT Color object, this returns a string representation of the object.

Variables

 o colors

  public static Color colors[]
An array of default colors.

 o colorStrings

  public static String colorStrings[]
An array of color strings matching the default colors.

Constructors

 o JCColorUtil

  public JCColorUtil()

Methods

 o colorIndex

  public static int colorIndex(Color c)
When provided with an instance of an AWT Color object, this returns the index in the colors array that matches the color. This can be used to translate a color into a color string.

 o colorToString

  public static String colorToString(Color c)
When provided with an instance of an AWT Color object, this returns a string representation of the object. It uses the colorStrings and colors arrays for translation purposes. If no match is found, it uses toString().


All Packages  Class Hierarchy  This Package  Previous  Next  Index