com.vaadin.ui.renderers.

Class ImageRenderer<T>

    • Constructor Detail

      • ImageRenderer

        public ImageRenderer()

        Creates a new image renderer.

      • ImageRenderer

        public ImageRenderer​(ClickableRenderer.RendererClickListener<T> listener)

        Creates a new image renderer and adds the given click listener to it.

        Parameters:

        listener - the click listener to register

    • Method Detail

      • encode

        public elemental.json.JsonValue encode​(Resource resource)

        Description copied from interface: Renderer

        Encodes the given value into a JsonValue.

        Specified by:

        encode in interface Renderer<T>

        Overrides:

        encode in class AbstractRenderer<T,​Resource>

        Parameters:

        resource - the value to encode

        Returns:

        a JSON representation of the given value

      • getState

        protected ImageRendererState getState()

        Description copied from class: AbstractClientConnector

        Returns the shared state for this connector. The shared state object is shared between the server connector and the client connector. Changes are only communicated from the server to the client and not in the other direction.

        As a side effect, marks the connector dirty so any changes done to the state will be sent to the client. Use getState(false) to avoid marking the connector as dirty.

        Overrides:

        getState in class ClickableRenderer<T,​Resource>

        Returns:

        The shared state for this connector. Never null.