Class CssColorConverter
- java.lang.Object
-
- com.bc.ceres.swing.figure.support.CssColorConverter
-
-
Constructor Summary
Constructors Constructor Description CssColorConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
format(Color value)
Converts a value of the type returned bygetValueType()
to its plain text representation.Class<? extends 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 bygetValueType()
.
-
-
-
Method Detail
-
getValueType
public Class<? extends Color> getValueType()
Gets the value type.- Specified by:
getValueType
in interfaceConverter<Color>
- Returns:
- The value type.
-
parse
public Color parse(String text) throws ConversionException
Converts a value from its plain text representation to a Java object instance of the type returned bygetValueType()
.- Specified by:
parse
in interfaceConverter<Color>
- Parameters:
text
- The textual representation of the value. It must be either in hexadecimal format (e.g. "#FFFFFF" or "FFFFFF") or given by a string of comma-separated numbers, such as "255,255,255".- Returns:
- The converted value.
- Throws:
ConversionException
- If the conversion fails.
-
-