org.omegahat.Graphics.Utils
Class ColorParser

java.lang.Object
  |
  +--org.omegahat.Graphics.Utils.ColorParser
All Implemented Interfaces:
ColorParserInt

public class ColorParser
extends java.lang.Object
implements ColorParserInt

Facilities for processing color specifications in string form; for example, from properties files, etc.


Field Summary
protected  java.util.Hashtable namedColors
          Table of named colors.
 
Constructor Summary
ColorParser()
           
 
Method Summary
 java.util.Hashtable namedColors()
           
 java.util.Hashtable namedColors(java.util.Hashtable props)
           
 java.util.Hashtable namedColors(java.io.InputStream stream)
           
 java.util.Hashtable namedColors(java.lang.String[] names, java.awt.Color[] colors)
           
 java.awt.Color parse(java.lang.String c)
          Parse the specified string and lookup the color in the internal table of this class or use the default decode method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namedColors

protected java.util.Hashtable namedColors
Table of named colors.
Constructor Detail

ColorParser

public ColorParser()
Method Detail

parse

public java.awt.Color parse(java.lang.String c)
Parse the specified string and lookup the color in the internal table of this class or use the default decode method.
Specified by:
parse in interface ColorParserInt

namedColors

public java.util.Hashtable namedColors()

namedColors

public java.util.Hashtable namedColors(java.io.InputStream stream)

namedColors

public java.util.Hashtable namedColors(java.util.Hashtable props)

namedColors

public java.util.Hashtable namedColors(java.lang.String[] names,
                                       java.awt.Color[] colors)