public final class StandardColorSource<K extends java.lang.Comparable<K>> extends java.lang.Object implements ColorSource<K>, java.io.Serializable
ColorSource interface.
| Constructor and Description |
|---|
StandardColorSource()
Creates a new instance with default colors.
|
StandardColorSource(java.awt.Color... colors)
Creates a new instance with the supplied sequence of colors.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests this paint source for equality with an arbitrary object.
|
java.awt.Color |
getColor(K key)
Returns the color associated with the specified key.
|
void |
setColor(K key,
java.awt.Color color)
Sets the color for the specified key.
|
void |
style(java.awt.Color... colors)
Clears existing color settings and sets the default colors to the
supplied value.
|
public StandardColorSource()
public StandardColorSource(java.awt.Color... colors)
null.colors - the colors (null not permitted).public java.awt.Color getColor(K key)
getColor in interface ColorSource<K extends java.lang.Comparable<K>>key - the key (null not permitted).null).public void setColor(K key, java.awt.Color color)
setColor in interface ColorSource<K extends java.lang.Comparable<K>>key - the key (null not permitted).color - the color (null permitted).public void style(java.awt.Color... colors)
style in interface ColorSource<K extends java.lang.Comparable<K>>colors - the colors (null not permitted).public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).