Class pvr.widget.editors.formatters.Formatter
Provides a service for formatting property values according to the parameters of their associated editor widget.
If the parameters include a choice list, the associated choice label is returned. Otherwise, the associated controller's converter is used to format the value.
You may extend this class if your custom editor class requires a custom formatter.
Defined in: <pvr\widget\editors\formatters\Formatter.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Method Attributes | Method Name and Description |
---|---|
constructor(params)
Creates a pvr.widget.editors.formatters.Formatter object with the specified parameters.
|
|
format(value)
Format the specified value according to the current parameters.
|
|
setParam(name, value)
Set the specified parameter value.
|
|
setParams(params)
Set the parameters.
|
Method Detail
constructor(params)
Creates a pvr.widget.editors.formatters.Formatter object with the specified parameters.
- Parameters:
- params
- The parameters.
format(value)
Format the specified value according to the current parameters.
- Parameters:
- value
- The value.
- Returns:
- The formatted value.
setParam(name, value)
Set the specified parameter value.
- Parameters:
- name
- The parameter name.
- value
- The parameter value.
setParams(params)
Set the parameters.
- Parameters:
- params
- The parameters.