Package com.bc.ceres.binding.converters
Class ColorConverter
- java.lang.Object
-
- com.bc.ceres.binding.converters.ColorConverter
-
-
Field Summary
Fields Modifier and Type Field Description static ColorConverter
INSTANCE
-
Constructor Summary
Constructors Constructor Description ColorConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
format(Color color)
Converts a value of the type returned byConverter.getValueType()
to its plain text representation.Class<Color>
getValueType()
Gets the value type.Color
parse(String text)
Converts a value from its plain text representation to a Java object instance of the type returned byConverter.getValueType()
.
-
-
-
Field Detail
-
INSTANCE
public static final ColorConverter INSTANCE
-
-
Method Detail
-
getValueType
public Class<Color> getValueType()
Description copied from interface:Converter
Gets the value type.- Specified by:
getValueType
in interfaceConverter<Color>
- Returns:
- The value type.
-
parse
public Color parse(String text) throws ConversionException
Description copied from interface:Converter
Converts a value from its plain text representation to a Java object instance of the type returned byConverter.getValueType()
.- Specified by:
parse
in interfaceConverter<Color>
- Parameters:
text
- The textual representation of the value.- Returns:
- The converted value.
- Throws:
ConversionException
- If the conversion fails.
-
format
public String format(Color color)
Description copied from interface:Converter
Converts a value of the type returned byConverter.getValueType()
to its plain text representation.
-
-