com.vaadin.ui.renderers.

Class ButtonRenderer<T>

    • Constructor Detail

      • ButtonRenderer

        public ButtonRenderer​(String nullRepresentation)

        Creates a new button renderer.

        Parameters:

        nullRepresentation - the textual representation of null value

      • ButtonRenderer

        public ButtonRenderer​(ClickableRenderer.RendererClickListener<T> listener,
                              String nullRepresentation)

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

        Parameters:

        listener - the click listener to register

        nullRepresentation - the textual representation of null value

      • ButtonRenderer

        public ButtonRenderer()

        Creates a new button renderer.

      • ButtonRenderer

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

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

        Parameters:

        listener - the click listener to register

    • Method Detail

      • getState

        protected ButtonRendererState 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,​String>

        Returns:

        The shared state for this connector. Never null.

      • setHtmlContentAllowed

        public void setHtmlContentAllowed​(boolean htmlContentAllowed)

        Sets whether the data should be rendered as HTML (instead of text).

        By default everything is rendered as text.

        Parameters:

        htmlContentAllowed - true to render as HTML, false to render as text

        Since:

        8.0.3

      • isHtmlContentAllowed

        public boolean isHtmlContentAllowed()

        Gets whether the data should be rendered as HTML (instead of text).

        By default everything is rendered as text.

        Returns:

        true if the renderer renders a HTML, false if the content is rendered as text

        Since:

        8.0.3