com.vaadin.client.connectors.

Class AbstractRendererConnector<T>

    • Constructor Detail

      • AbstractRendererConnector

        protected AbstractRendererConnector()
    • Method Detail

      • getRenderer

        public Renderer<T> getRenderer()

        Returns the renderer associated with this renderer connector.

        A subclass of AbstractRendererConnector should override this method as shown below. The framework uses GWT.create(Class) to create a renderer based on the return type of the overridden method, but only if createRenderer() is not overridden as well:

         public MyRenderer getRenderer() {
             return (MyRenderer) super.getRenderer();
         }
         

        Returns:

        the renderer bound to this connector

      • createRenderer

        protected Renderer<T> createRenderer()

        Creates a new Renderer instance associated with this renderer connector.

        You should typically not override this method since the framework by default generates an implementation that uses GWT.create(Class) to create a renderer of the same type as returned by the most specific override of getRenderer(). If you do override the method, you can't call super.createRenderer() since the metadata needed for that implementation is not generated if there's an override of the method.

        Returns:

        a new renderer to be used with this connector

      • decode

        public T decode​(elemental.json.JsonValue value)

        Decodes the given JSON value into a value of type T so it can be passed to the renderer.

        Parameters:

        value - the value to decode

        Returns:

        the decoded value of value