Class NumberFormatter
java.lang.Object
io.jmix.flowui.component.formatter.NumberFormatter
@Component("flowui_NumberFormatter")
@Scope("prototype")
public class NumberFormatter
extends Object
implements Formatter<Number>
Number formatter to be used in view descriptors and controllers.
This formatter formats the Number
value into a string depending on the format string.
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentAuthentication
protected DatatypeRegistry
protected String
protected FormatStringsRegistry
-
Constructor Summary
ConstructorDescriptionNumberFormatter
(CurrentAuthentication currentAuthentication, DatatypeRegistry datatypeRegistry, FormatStringsRegistry formatStringsRegistry) -
Method Summary
-
Field Details
-
format
-
currentAuthentication
-
datatypeRegistry
-
formatStringsRegistry
-
-
Constructor Details
-
NumberFormatter
public NumberFormatter(CurrentAuthentication currentAuthentication, DatatypeRegistry datatypeRegistry, FormatStringsRegistry formatStringsRegistry)
-
-
Method Details
-
setFormat
Sets the format string describing the number format which will be used to createDecimalFormat
instance. It can be either a format string, or a key in message group.- Parameters:
format
- a format string or a key in message group
-
apply
Description copied from interface:Formatter
Formats a value to a string.
-