public class ColorMapper extends Object
ColorMapper is a wrapper for a Hashtable that maps user names (or any set of Strings) to colors.
The colors are standard names for HTML colors.
| Modifier and Type | Class and Description |
|---|---|
class |
ColorMapper.KeyValue |
| Modifier and Type | Field and Description |
|---|---|
protected static String[] |
COLORS |
protected Map |
m_map |
protected int |
m_next |
protected static int |
NumColors |
| Constructor and Description |
|---|
ColorMapper()
Construct the ColorMapper.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getColor(String name)
get the color associated with a string.
|
String[] |
getColors()
Returns the entire array of color names.
|
Map |
getMapping()
Returns the mapping of names to colors.
|
List |
getMappingList()
Returns the mapping of names to colors.
|
int |
getNext()
Returns the index of the next color in the COLORS array that will be assigned to a name.
|
int |
getNum_colors()
Returns the size of the array of color names.
|
protected int m_next
protected Map m_map
protected static final String[] COLORS
protected static final int NumColors
public String getColor(String name)
public Map getMapping()
public List getMappingList()
public int getNext()
public String[] getColors()
public int getNum_colors()
Copyright © 2003-2015 The Sakai Foundation. All Rights Reserved.