Package io.jmix.ui.component.formatter
Class NumberFormatter
java.lang.Object
io.jmix.ui.component.formatter.NumberFormatter
@Component("ui_NumberFormatter")
@Scope("prototype")
public class NumberFormatter
extends Object
implements Formatter<Number>
Number formatter to be used in screen 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
protected Messages
-
Constructor Summary
-
Method Summary
-
Field Details
-
format
-
currentAuthentication
-
messages
-
datatypeRegistry
-
formatStringsRegistry
-
-
Constructor Details
-
NumberFormatter
public NumberFormatter()
-
-
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.
-