Package com.vaadin.featurepack.util
Class RendererAdapter<T,V>
java.lang.Object
com.vaadin.flow.data.renderer.Renderer<T>
com.vaadin.flow.data.renderer.LitRenderer<T>
com.vaadin.flow.data.renderer.ComponentRenderer<com.vaadin.flow.component.Component,T>
com.vaadin.flow.data.renderer.BasicRenderer<T,V>
com.vaadin.featurepack.util.RendererAdapter<T,V>
- Type Parameters:
T- the Grid's bean type.V- the V8 Column's presentation type.
- All Implemented Interfaces:
Serializable
public class RendererAdapter<T,V>
extends com.vaadin.flow.data.renderer.BasicRenderer<T,V>
An adapter for renderers so that they show the value presented in a column
instead of the Grid's bean value.
- Author:
- David Sosa, Tomi Virkki
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRendererAdapter(com.vaadin.flow.function.ValueProvider<T, V> valueProvider, com.vaadin.flow.data.renderer.Renderer<V> renderer) Creates a new adapter to show the value provided by the -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.ComponentcreateComponent(T item) com.vaadin.flow.data.renderer.Rendering<T> render(com.vaadin.flow.dom.Element container, com.vaadin.flow.data.provider.DataKeyMapper<T> keyMapper, String rendererName) com.vaadin.flow.component.ComponentupdateComponent(com.vaadin.flow.component.Component currentComponent, T item) Methods inherited from class com.vaadin.flow.data.renderer.BasicRenderer
getFormattedValue, getTemplateExpression, getValueProviderMethods inherited from class com.vaadin.flow.data.renderer.LitRenderer
getValueProviders, of, withFunction, withFunction, withPropertyMethods inherited from class com.vaadin.flow.data.renderer.Renderer
render
-
Constructor Details
-
RendererAdapter
protected RendererAdapter(com.vaadin.flow.function.ValueProvider<T, V> valueProvider, com.vaadin.flow.data.renderer.Renderer<V> renderer) Creates a new adapter to show the value provided by theValueProviderwith a specificRenderer.- Parameters:
valueProvider- theValueProviderthat takes the Grid's beanvalue and returns the Column's presentation value.
renderer- theRendererthat takes the Column's value.
-
-
Method Details
-
createComponent
-
updateComponent
public com.vaadin.flow.component.Component updateComponent(com.vaadin.flow.component.Component currentComponent, T item) - Overrides:
updateComponentin classcom.vaadin.flow.data.renderer.ComponentRenderer<com.vaadin.flow.component.Component,T>
-
render
public com.vaadin.flow.data.renderer.Rendering<T> render(com.vaadin.flow.dom.Element container, com.vaadin.flow.data.provider.DataKeyMapper<T> keyMapper, String rendererName) - Overrides:
renderin classcom.vaadin.flow.data.renderer.ComponentRenderer<com.vaadin.flow.component.Component,T>
-