Class ColorFormatter
java.lang.Object
net.sf.basedb.clients.web.formatter.ColorFormatter
Formatter that adds a small colored box next to a value. The actual value
is formatted by the supplied numeric formatter. The color to display is
generated by a
ColorGenerator
. Null or Float NaN values are
not colored.- Version:
- 2.0
- Author:
- nicklas
- Last modified
- $Date: 2013-09-09 09:56:59 +0200 (må, 09 sep 2013) $
-
Field Summary
-
Constructor Summary
ConstructorDescriptionColorFormatter
(ColorGenerator colorGen, Formatter<Number> numberFormatter) Create a new color formatter. -
Method Summary
-
Field Details
-
colorGen
-
numberFormatter
-
-
Constructor Details
-
ColorFormatter
Create a new color formatter.- Parameters:
colorGen
- The color generator to use for generating colorsnumberFormatter
- The formatter to use for formatterin the values
-
-
Method Details
-
format
Description copied from interface:Formatter
Format a value by converting it to a string. -
parseString
Description copied from interface:Formatter
Parse a string and return a value of the correct type. A null input string should (unless otherwise documented by a specific formatter implementation) be allowed and may return null or any other "default" value.- Specified by:
parseString
in interfaceFormatter<Number>
- Parameters:
value
- The string to parse- Returns:
- An object
-