Package io.jmix.ui.component.renderer
Class NumberRendererImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractDataGrid.AbstractRenderer<Object,Number>
io.jmix.ui.component.renderer.NumberRendererImpl
- All Implemented Interfaces:
DataGrid.HasFormatString
,DataGrid.HasLocale
,DataGrid.HasNullRepresentation
,DataGrid.NumberRenderer
,DataGrid.Renderer
,RendererWrapper<Number>
@Component("ui_NumberRenderer")
@Scope("prototype")
public class NumberRendererImpl
extends AbstractDataGrid.AbstractRenderer<Object,Number>
implements DataGrid.NumberRenderer
A renderer for presenting number values.
-
Field Summary
Fields inherited from class io.jmix.ui.component.impl.AbstractDataGrid.AbstractRenderer
dataGrid, nullRepresentation, renderer
Fields inherited from interface io.jmix.ui.component.DataGrid.NumberRenderer
NAME
-
Constructor Summary
ConstructorDescriptionNumberRendererImpl
(String formatString) NumberRendererImpl
(String formatString, Locale locale) NumberRendererImpl
(String formatString, Locale locale, String nullRepresentation) NumberRendererImpl
(NumberFormat numberFormat) NumberRendererImpl
(NumberFormat numberFormat, String nullRepresentation) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
copy
(DataGrid.Renderer existingRenderer) protected com.vaadin.ui.renderers.Renderer<Number>
com.vaadin.ui.renderers.NumberRenderer
Null representation for the renderer.void
setCurrentAuthentication
(CurrentAuthentication currentAuthentication) void
setFormatString
(String formatString) void
Sets the locale in which to present values.void
setNullRepresentation
(String nullRepresentation) Sets null representation for the renderer.void
setNumberFormat
(NumberFormat numberFormat) Methods inherited from class io.jmix.ui.component.impl.AbstractDataGrid.AbstractRenderer
checkRendererNotSet, getColumnByGridColumn, getDataGrid, getPresentationValueProvider, resetImplementation, setDataGrid
-
Constructor Details
-
NumberRendererImpl
public NumberRendererImpl() -
NumberRendererImpl
-
NumberRendererImpl
-
NumberRendererImpl
- Throws:
IllegalArgumentException
-
NumberRendererImpl
public NumberRendererImpl(String formatString, @Nullable Locale locale) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
NumberRendererImpl
-
-
Method Details
-
setCurrentAuthentication
-
getImplementation
public com.vaadin.ui.renderers.NumberRenderer getImplementation()- Specified by:
getImplementation
in interfaceRendererWrapper<Number>
- Overrides:
getImplementation
in classAbstractDataGrid.AbstractRenderer<Object,
Number>
-
createImplementation
- Specified by:
createImplementation
in classAbstractDataGrid.AbstractRenderer<Object,
Number>
-
copy
- Specified by:
copy
in classAbstractDataGrid.AbstractRenderer<Object,
Number>
-
getNullRepresentation
Description copied from interface:DataGrid.HasNullRepresentation
Null representation for the renderer.- Specified by:
getNullRepresentation
in interfaceDataGrid.HasNullRepresentation
- Overrides:
getNullRepresentation
in classAbstractDataGrid.AbstractRenderer<Object,
Number> - Returns:
- a textual representation of
null
-
setNullRepresentation
Description copied from interface:DataGrid.HasNullRepresentation
Sets null representation for the renderer.- Specified by:
setNullRepresentation
in interfaceDataGrid.HasNullRepresentation
- Overrides:
setNullRepresentation
in classAbstractDataGrid.AbstractRenderer<Object,
Number> - Parameters:
nullRepresentation
- a textual representation ofnull
-
getLocale
- Specified by:
getLocale
in interfaceDataGrid.HasLocale
- Returns:
- the locale which is used to present values
-
setLocale
Description copied from interface:DataGrid.HasLocale
Sets the locale in which to present values.- Specified by:
setLocale
in interfaceDataGrid.HasLocale
- Parameters:
locale
- the locale in which to present values
-
getNumberFormat
- Specified by:
getNumberFormat
in interfaceDataGrid.NumberRenderer
- Returns:
- the instance of
NumberFormat
which is used to present numbers
-
setNumberFormat
- Specified by:
setNumberFormat
in interfaceDataGrid.NumberRenderer
- Parameters:
numberFormat
- the instance ofNumberFormat
with which to present numbers
-
getFormatString
Description copied from interface:DataGrid.NumberRenderer
- Specified by:
getFormatString
in interfaceDataGrid.HasFormatString
- Specified by:
getFormatString
in interfaceDataGrid.NumberRenderer
- Returns:
- the format string describing the number format
-
setFormatString
Description copied from interface:DataGrid.NumberRenderer
- Specified by:
setFormatString
in interfaceDataGrid.HasFormatString
- Specified by:
setFormatString
in interfaceDataGrid.NumberRenderer
- Parameters:
formatString
- the format string describing the number format which will be used to createNumberFormat
instance.- See Also:
-