Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ix.util
Class ColorGenerator

    java.lang.Object
      ix.util.ColorGenerator

    public class ColorGenerator

extends java.lang.Object

A source of "nice" colors for use in GUIs.

Field Summary
`protected int[]` | `niceColors`
`protected int` | `niceColorsUsed`
`protected java.util.Map<java.lang.Object,java.awt.Color>` | `objectToColorMap`

Constructor Summary
`ColorGenerator()`

Method Summary
`java.awt.Color` | `genColor(java.lang.Object obj)`
`java.awt.Color` | `getColor(java.lang.Object obj)`
`java.awt.Color` | `getColor(java.lang.Object obj, java.awt.Color defaultColor)`
`static java.awt.Color` | `getNamedColor(java.lang.String name)`
`java.awt.Color` | `nextColor()`
`int` | `nextRGB()`
`void` | `setColor(java.lang.Object obj, java.awt.Color color)`
`void` | `setColor(java.lang.Object obj, int rgb)`
`void` | `setColor(java.lang.Object obj, java.lang.String colorName)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### objectToColorMap

    protected java.util.Map<java.lang.Object,java.awt.Color> objectToColorMap

### niceColorsUsed

    protected int niceColorsUsed

### niceColors

    protected int[] niceColors

Constructor Detail

### ColorGenerator

    public ColorGenerator()

Method Detail

### genColor

    public java.awt.Color genColor(java.lang.Object obj)

### getColor

    public java.awt.Color getColor(java.lang.Object obj)

### getColor

    public java.awt.Color getColor(java.lang.Object obj,
                                   java.awt.Color defaultColor)

### setColor

    public void setColor(java.lang.Object obj,
                         java.awt.Color color)

### setColor

    public void setColor(java.lang.Object obj,
                         int rgb)

### setColor

    public void setColor(java.lang.Object obj,
                         java.lang.String colorName)

### getNamedColor

    public static java.awt.Color getNamedColor(java.lang.String name)

### nextColor

    public java.awt.Color nextColor()

### nextRGB

    public int nextRGB()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD