ObjectConverterpublic class RgbColorConverter extends ColorConverter
CONTEXT_HEX, CONTEXT_HEX_WITH_ALPHA, CONTEXT_RGB, CONTEXT_RGBA| Constructor | Description |
|---|---|
RgbColorConverter() |
Creates a RgbColorConverter.
|
RgbColorConverter(boolean alphaIncluded) |
Creates a RgbColorConverter.
|
| Modifier and Type | Method | Description |
|---|---|---|
Object |
fromString(String string,
ConverterContext context) |
Converts from String to an object.
|
boolean |
isAlphaIncluded() |
Get the flag if this converter should consider alpha value.
|
void |
setAlphaIncluded(boolean alphaIncluded) |
Set the flag if this converter should consider alpha value.
|
boolean |
supportFromString(String string,
ConverterContext context) |
If it supports fromString.
|
boolean |
supportToString(Object object,
ConverterContext context) |
If it supports toString method.
|
String |
toString(Object object,
ConverterContext context) |
Converts from object to String based on current locale.
|
public RgbColorConverter()
public RgbColorConverter(boolean alphaIncluded)
alphaIncluded - the flag if alpha value will be included in this converterpublic boolean isAlphaIncluded()
RgbColorConverterpublic void setAlphaIncluded(boolean alphaIncluded)
alphaIncluded - the flag if this converter should consider alpha value.isAlphaIncluded()public String toString(Object object, ConverterContext context)
ObjectConverterobject - object to be convertedcontext - converter context to be usedpublic boolean supportToString(Object object, ConverterContext context)
ObjectConverterobject - object to be convertedcontext - converter context to be usedpublic boolean supportFromString(String string, ConverterContext context)
ObjectConverterstring - the stringcontext - context to be convertedpublic Object fromString(String string, ConverterContext context)
ObjectConverterstring - the stringcontext - context to be converted