    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.

##

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

##

JCColorUtil()

##

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

##

colors

     public static Color colors[]

  An array of default colors.

colorStrings

     public static String colorStrings[]

  An array of color strings matching the default colors.

##

JCColorUtil

     public JCColorUtil()

##

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.

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