| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.text.Format
infovis.column.format.ColorFormat
public class ColorFormat
Format for parsing color name.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class java.text.Format | 
|---|
Format.Field | 
| Constructor Summary | |
|---|---|
ColorFormat()
Constructor.  | 
|
| Method Summary | |
|---|---|
 void | 
addColor(String name,
         Color color)
Adds a new named color name.  | 
 void | 
addColor(String name,
         int r,
         int g,
         int b)
Adds a new named color given its RGB values.  | 
 StringBuffer | 
format(Object obj,
       StringBuffer toAppendTo,
       FieldPosition pos)
 | 
 Color | 
getColor(String name)
Returns a color given its name.  | 
static ColorFormat | 
getInstance()
Returns the instance of that format.  | 
 Object | 
parseObject(String source,
            ParsePosition pos)
 | 
static void | 
setInstance(ColorFormat format)
Sets the instance of that format.  | 
| Methods inherited from class java.text.Format | 
|---|
clone, format, formatToCharacterIterator, parseObject | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ColorFormat()
| Method Detail | 
|---|
public static ColorFormat getInstance()
public static void setInstance(ColorFormat format)
format - the format
public void addColor(String name,
                     Color color)
name - the namecolor - the color
public void addColor(String name,
                     int r,
                     int g,
                     int b)
name - the namer - the red valueg - the green valueb - the blue valuepublic Color getColor(String name)
name - the name
public StringBuffer format(Object obj,
                           StringBuffer toAppendTo,
                           FieldPosition pos)
format in class Format
public Object parseObject(String source,
                          ParsePosition pos)
parseObject in class Format
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||