Package io.jmix.ui.component.renderer
Class ButtonRendererImpl<T>
java.lang.Object
io.jmix.ui.component.impl.AbstractDataGrid.AbstractRenderer<T,V>
io.jmix.ui.component.renderer.AbstractClickableRenderer<T,String>
io.jmix.ui.component.renderer.ButtonRendererImpl<T>
- All Implemented Interfaces:
DataGrid.ButtonRenderer<T>
,DataGrid.HasNullRepresentation
,DataGrid.HasRendererClickListener<T>
,DataGrid.Renderer
,RendererWrapper<String>
@Component("ui_ButtonRenderer")
@Scope("prototype")
public class ButtonRendererImpl<T>
extends AbstractClickableRenderer<T,String>
implements DataGrid.ButtonRenderer<T>
A Renderer that displays a button with a textual caption. The value of the
corresponding property is used as the caption. Click listeners can be added
to the renderer, invoked when any of the rendered buttons is clicked.
-
Field Summary
Fields inherited from class io.jmix.ui.component.renderer.AbstractClickableRenderer
listener
Fields inherited from class io.jmix.ui.component.impl.AbstractDataGrid.AbstractRenderer
dataGrid, nullRepresentation, renderer
Fields inherited from interface io.jmix.ui.component.DataGrid.ButtonRenderer
NAME
-
Constructor Summary
ConstructorDescriptionButtonRendererImpl
(String nullRepresentation) ButtonRendererImpl
(Consumer<DataGrid.RendererClickEvent<T>> listener) ButtonRendererImpl
(Consumer<DataGrid.RendererClickEvent<T>> listener, String nullRepresentation) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
copy
(DataGrid.Renderer existingRenderer) protected com.vaadin.ui.renderers.ButtonRenderer<T>
com.vaadin.ui.renderers.ButtonRenderer<T>
Null representation for the renderer.void
setNullRepresentation
(String nullRepresentation) Sets null representation for the renderer.Methods inherited from class io.jmix.ui.component.renderer.AbstractClickableRenderer
createClickListenerWrapper, setRendererClickListener
Methods inherited from class io.jmix.ui.component.impl.AbstractDataGrid.AbstractRenderer
checkRendererNotSet, getColumnByGridColumn, getDataGrid, getPresentationValueProvider, resetImplementation, setDataGrid
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.DataGrid.HasRendererClickListener
setRendererClickListener
-
Constructor Details
-
ButtonRendererImpl
public ButtonRendererImpl() -
ButtonRendererImpl
-
ButtonRendererImpl
-
ButtonRendererImpl
public ButtonRendererImpl(@Nullable Consumer<DataGrid.RendererClickEvent<T>> listener, String nullRepresentation)
-
-
Method Details
-
getImplementation
- Specified by:
getImplementation
in interfaceRendererWrapper<T>
- Overrides:
getImplementation
in classAbstractDataGrid.AbstractRenderer<T,
String>
-
createImplementation
- Specified by:
createImplementation
in classAbstractDataGrid.AbstractRenderer<T,
String>
-
copy
- Specified by:
copy
in classAbstractDataGrid.AbstractRenderer<T,
String>
-
getNullRepresentation
Description copied from interface:DataGrid.HasNullRepresentation
Null representation for the renderer.- Specified by:
getNullRepresentation
in interfaceDataGrid.HasNullRepresentation
- Overrides:
getNullRepresentation
in classAbstractDataGrid.AbstractRenderer<T,
String> - 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<T,
String> - Parameters:
nullRepresentation
- a textual representation ofnull
-