|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.properties.converter.AbstractConverter
org.xwiki.properties.internal.converter.ColorConverter
@Component @Named(value="java.awt.Color") @Singleton public class ColorConverter
Bean Utils converter that converts a value into an Color object.
| Constructor Summary | |
|---|---|
ColorConverter()
|
|
| Method Summary | |
|---|---|
protected String |
convertToString(Object value)
Convert the input object into a String. |
protected Color |
convertToType(Type type,
Object value)
Convert the input object into an output object of the specified type. |
Color |
parse(String value)
Convert a String in Color. |
protected Color |
parseHtml(String value)
Parsers a String in the form "#xxxxxx" into an SWT RGB class. |
protected Color |
parseRGB(String value)
Parsers a String in the form "x, y, z" into an SWT RGB class. |
| Methods inherited from class org.xwiki.properties.converter.AbstractConverter |
|---|
convert, convertToType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorConverter()
| Method Detail |
|---|
protected Color convertToType(Type type,
Object value)
Typical implementations will provide a minimum of String --> type conversion.
convertToType in class AbstractConvertertype - Data type to which this value should be converted.value - The input value to be converted.
AbstractConverter.convertToType(java.lang.reflect.Type, Object)protected String convertToString(Object value)
N.B.This implementation simply uses the value's toString() method and should be overriden if
a more sophisticated mechanism for conversion to a String is required.
convertToString in class AbstractConvertervalue - The input value to be converted.
org.apache.commons.beanutils.converters.AbstractConverter#convertToString(java.lang.Object)protected Color parseRGB(String value)
value - the color as String
protected Color parseHtml(String value)
value - the color as String
public Color parse(String value)
Color.
value - the String to parse
Color
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||