cookxml.cookswing.converter
Class ColorConverter

java.lang.Object
  extended bycookxml.cookswing.converter.ColorConverter
All Implemented Interfaces:
Converter

public class ColorConverter
extends Object
implements Converter

Convert a hex representation in "#rrggbb", "rrggbb", or names predefined in Color.

Since:
CookSwing 1.0
See Also:
Color

Method Summary
 Object convert(String value, DecodeEngine decodeEngine)
          converts a string value into an object type.
static Converter getInstance()
           
static int str2hex(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Converter getInstance()

convert

public Object convert(String value,
                      DecodeEngine decodeEngine)
               throws ConverterException
Description copied from interface: Converter
converts a string value into an object type.

Specified by:
convert in interface Converter
Parameters:
value - the string value to be converted.
decodeEngine - the DecodeEngine to be used.
Returns:
the converted object.
Throws:
ConverterException

str2hex

public static int str2hex(String str)