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

    Constructors
    Modifier
    Constructor
    Description
    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 the
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.component.Component
     
    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.Component
    updateComponent(com.vaadin.flow.component.Component currentComponent, T item)
     

    Methods inherited from class com.vaadin.flow.data.renderer.BasicRenderer

    getFormattedValue, getTemplateExpression, getValueProvider

    Methods inherited from class com.vaadin.flow.data.renderer.LitRenderer

    getValueProviders, of, withFunction, withFunction, withProperty

    Methods inherited from class com.vaadin.flow.data.renderer.Renderer

    render

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 the

      ValueProvider with a specific Renderer.

      Parameters:
      valueProvider - the ValueProvider that takes the Grid's bean

      value and returns the Column's presentation value.

      renderer - the Renderer that takes the Column's value.
  • Method Details

    • createComponent

      public com.vaadin.flow.component.Component createComponent(T item)
      Overrides:
      createComponent in class com.vaadin.flow.data.renderer.BasicRenderer<T,V>
    • updateComponent

      public com.vaadin.flow.component.Component updateComponent(com.vaadin.flow.component.Component currentComponent, T item)
      Overrides:
      updateComponent in class com.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:
      render in class com.vaadin.flow.data.renderer.ComponentRenderer<com.vaadin.flow.component.Component,T>