Class ToolbarButtonRenderer

  • All Implemented Interfaces:
    Renderer<ButtonAction>

    public class ToolbarButtonRenderer
    extends Object
    implements Renderer<ButtonAction>
    A renderer for toolbar button actions, which displays the action as a toolbar button. The render can also be used in "standalone" mode (eg. without a JspContext).
    Version:
    2.12
    Author:
    nicklas
    Last modified
    $Date:2008-03-20 12:15:25 +0100 (Thu, 20 Mar 2008) $
    • Method Detail

      • render

        public void render​(ButtonAction btn)
        Generates a toolbar button. If the button isn't visible nothing is generated. If the button isn't enabled, the onclick attribute is not generated.
        Specified by:
        render in interface Renderer<ButtonAction>
        Parameters:
        btn - The action to render
      • getHTML

        public String getHTML​(ButtonAction btn,
                              boolean displayText,
                              boolean displayIcon)
        Generate the HTML that is needed to create a toolbar button.
        Parameters:
        btn - The button information
        displayText - If text should be displayed on the button or not
        displayIcon - If the icon should be displayed on the button or not