Package io.jmix.ui.component.renderer
Class DateRendererImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractDataGrid.AbstractRenderer<Object,Date>
io.jmix.ui.component.renderer.DateRendererImpl
- All Implemented Interfaces:
DataGrid.DateRenderer
,DataGrid.HasFormatString
,DataGrid.HasLocale
,DataGrid.HasNullRepresentation
,DataGrid.Renderer
,RendererWrapper<Date>
@Component("ui_DateRenderer")
@Scope("prototype")
public class DateRendererImpl
extends AbstractDataGrid.AbstractRenderer<Object,Date>
implements DataGrid.DateRenderer
A renderer for presenting date 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.DateRenderer
NAME
-
Constructor Summary
ConstructorDescriptionDateRendererImpl
(String formatString) DateRendererImpl
(String formatString, String nullRepresentation) DateRendererImpl
(String formatString, Locale locale) DateRendererImpl
(String formatString, Locale locale, String nullRepresentation) DateRendererImpl
(DateFormat dateFormat) DateRendererImpl
(DateFormat dateFormat, String nullRepresentation) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
copy
(DataGrid.Renderer existingRenderer) protected com.vaadin.ui.renderers.DateRenderer
com.vaadin.ui.renderers.DateRenderer
Null representation for the renderer.void
setCurrentAuthentication
(CurrentAuthentication currentAuthentication) void
setDateFormat
(DateFormat dateFormat) void
setFormatString
(String formatString) void
Sets the locale in which to present values.void
setNullRepresentation
(String nullRepresentation) Sets null representation for the renderer.Methods inherited from class io.jmix.ui.component.impl.AbstractDataGrid.AbstractRenderer
checkRendererNotSet, getColumnByGridColumn, getDataGrid, getPresentationValueProvider, resetImplementation, setDataGrid
-
Constructor Details
-
DateRendererImpl
public DateRendererImpl() -
DateRendererImpl
-
DateRendererImpl
-
DateRendererImpl
-
DateRendererImpl
-
DateRendererImpl
-
DateRendererImpl
-
-
Method Details
-
setCurrentAuthentication
-
getImplementation
public com.vaadin.ui.renderers.DateRenderer getImplementation()- Specified by:
getImplementation
in interfaceRendererWrapper<Date>
- Overrides:
getImplementation
in classAbstractDataGrid.AbstractRenderer<Object,
Date>
-
createImplementation
protected com.vaadin.ui.renderers.DateRenderer createImplementation()- Specified by:
createImplementation
in classAbstractDataGrid.AbstractRenderer<Object,
Date>
-
copy
- Specified by:
copy
in classAbstractDataGrid.AbstractRenderer<Object,
Date>
-
getNullRepresentation
Description copied from interface:DataGrid.HasNullRepresentation
Null representation for the renderer.- Specified by:
getNullRepresentation
in interfaceDataGrid.HasNullRepresentation
- Overrides:
getNullRepresentation
in classAbstractDataGrid.AbstractRenderer<Object,
Date> - 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,
Date> - 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
-
getFormatString
Description copied from interface:DataGrid.DateRenderer
- Specified by:
getFormatString
in interfaceDataGrid.DateRenderer
- Specified by:
getFormatString
in interfaceDataGrid.HasFormatString
- Returns:
- the format string describing the date and time format
-
setFormatString
Description copied from interface:DataGrid.DateRenderer
- Specified by:
setFormatString
in interfaceDataGrid.DateRenderer
- Specified by:
setFormatString
in interfaceDataGrid.HasFormatString
- Parameters:
formatString
- the format string describing the date and time format which will be used to createDateFormat
instance.- See Also:
-
getDateFormat
- Specified by:
getDateFormat
in interfaceDataGrid.DateRenderer
- Returns:
- the instance of
DateFormat
which is used to present dates
-
setDateFormat
- Specified by:
setDateFormat
in interfaceDataGrid.DateRenderer
- Parameters:
dateFormat
- the instance ofDateFormat
with which to present dates
-