Interface ListGridCellFormatter
- All Known Subinterfaces:
ListGridCellFormatterCustomFormat
- All Known Implementing Classes:
ListGridBooleanFormatter
,ListGridDateFormatter
,ListGridDateTimeFormatter
,ListGridNumberFormatter
public interface ListGridCellFormatter
Display value formatter interface for ListGrid
.
The format(Object)
method must be implemented along with the interface implementation.
The method receives the value to be formatted in the parameter and must return a text value representing the formatted value.
The returned text value is displayed in the grid.
The framework includes some basic formatter classes. These formatter classes may be used for building a custom formatter, but also in a grid column. The framework’s basic formatter classes are the following:
ListGridBooleanFormatter
- Boolean value formatterListGridDateFormatter
- Date formatterListGridDateTimeFormatter
- Date and time formatterListGridNumberFormatter
- Numeric value formatter
- Since:
- 4.0
- Author:
- JBStrap
-
Method Summary
-
Method Details
-
format
Formats a value to the displayed format.- Parameters:
data
- The value to be formatted The object passed here is the value retrieved from the database and displayed in the column by theListGrid
component. The received value is passed using the same type as it was fetched from the database.- Returns:
- Displayed value in text format
The returned text value may contain HTML tags which are rendered.
If the return value is
null
, no value is displayed in the current cell.
-