com.alee.utils.xml
Class ColorConverter

java.lang.Object
  extended by com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
      extended by com.alee.utils.xml.ColorConverter
All Implemented Interfaces:
com.thoughtworks.xstream.converters.ConverterMatcher, com.thoughtworks.xstream.converters.SingleValueConverter

public class ColorConverter
extends com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter

Custom Color class converter.

Author:
Mikle Garin

Field Summary
static java.lang.String NULL_COLOR
          Null color constant.
 
Constructor Summary
ColorConverter()
           
 
Method Summary
 boolean canConvert(java.lang.Class type)
          
 java.lang.Object fromString(java.lang.String color)
          
 java.lang.String toString(java.lang.Object object)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_COLOR

public static final java.lang.String NULL_COLOR
Null color constant.

See Also:
Constant Field Values
Constructor Detail

ColorConverter

public ColorConverter()
Method Detail

canConvert

public boolean canConvert(java.lang.Class type)

Specified by:
canConvert in interface com.thoughtworks.xstream.converters.ConverterMatcher
Specified by:
canConvert in class com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter

fromString

public java.lang.Object fromString(java.lang.String color)

Specified by:
fromString in interface com.thoughtworks.xstream.converters.SingleValueConverter
Specified by:
fromString in class com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter

toString

public java.lang.String toString(java.lang.Object object)

Specified by:
toString in interface com.thoughtworks.xstream.converters.SingleValueConverter
Overrides:
toString in class com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter