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.
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 |
objectToColorMap
protected java.util.Map<java.lang.Object,java.awt.Color> objectToColorMap
niceColorsUsed
protected int niceColorsUsed
niceColors
protected int[] niceColors
ColorGenerator
public ColorGenerator()
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()