Class ToolbarButtonRenderer

java.lang.Object
net.sf.basedb.util.extensions.AbstractRenderer<ButtonAction>
net.sf.basedb.clients.web.extensions.toolbar.ToolbarButtonRenderer
All Implemented Interfaces:
Renderer<ButtonAction>

public class ToolbarButtonRenderer
extends AbstractRenderer<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) $
  • Field Details

  • Constructor Details

  • Method Details

    • render

      public void render​(ButtonAction btn, Extension<? extends ButtonAction> ext)
      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.
      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