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
listenerFields inherited from class io.jmix.ui.component.impl.AbstractDataGrid.AbstractRenderer
dataGrid, nullRepresentation, rendererFields inherited from interface io.jmix.ui.component.DataGrid.ButtonRenderer
NAME -
Constructor Summary
ConstructorsConstructorDescriptionButtonRendererImpl(String nullRepresentation) ButtonRendererImpl(Consumer<DataGrid.RendererClickEvent<T>> listener) ButtonRendererImpl(Consumer<DataGrid.RendererClickEvent<T>> listener, String nullRepresentation) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopy(DataGrid.Renderer existingRenderer) protected com.vaadin.ui.renderers.ButtonRenderer<T>com.vaadin.ui.renderers.ButtonRenderer<T>Null representation for the renderer.voidsetNullRepresentation(String nullRepresentation) Sets null representation for the renderer.Methods inherited from class io.jmix.ui.component.renderer.AbstractClickableRenderer
createClickListenerWrapper, setRendererClickListenerMethods inherited from class io.jmix.ui.component.impl.AbstractDataGrid.AbstractRenderer
checkRendererNotSet, getColumnByGridColumn, getDataGrid, getPresentationValueProvider, resetImplementation, setDataGridMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getImplementationin interfaceRendererWrapper<T>- Overrides:
getImplementationin classAbstractDataGrid.AbstractRenderer<T,String>
-
createImplementation
- Specified by:
createImplementationin classAbstractDataGrid.AbstractRenderer<T,String>
-
copy
- Specified by:
copyin classAbstractDataGrid.AbstractRenderer<T,String>
-
getNullRepresentation
Description copied from interface:DataGrid.HasNullRepresentationNull representation for the renderer.- Specified by:
getNullRepresentationin interfaceDataGrid.HasNullRepresentation- Overrides:
getNullRepresentationin classAbstractDataGrid.AbstractRenderer<T,String> - Returns:
- a textual representation of
null
-
setNullRepresentation
Description copied from interface:DataGrid.HasNullRepresentationSets null representation for the renderer.- Specified by:
setNullRepresentationin interfaceDataGrid.HasNullRepresentation- Overrides:
setNullRepresentationin classAbstractDataGrid.AbstractRenderer<T,String> - Parameters:
nullRepresentation- a textual representation ofnull
-