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>
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 Summary
-
Constructor Summary
ConstructorDescriptionCreate a new "standalone" toolbar button renderer.ToolbarButtonRenderer
(JspContext context) Create a new toolbar button renderer. -
Method Summary
Modifier and TypeMethodDescriptiongetHTML
(ButtonAction btn, boolean displayText, boolean displayIcon) Generate the HTML that is needed to create a toolbar button.void
render
(ButtonAction btn, Extension<? extends ButtonAction> ext) Generates a toolbar button.Methods inherited from class net.sf.basedb.util.extensions.AbstractRenderer
render
-
Field Details
-
context
-
-
Constructor Details
-
ToolbarButtonRenderer
public ToolbarButtonRenderer()Create a new "standalone" toolbar button renderer. UsegetHTML(ButtonAction, boolean, boolean)
to generate the HTML. Do not userender(ButtonAction, Extension)
since that requires aJspContext
. -
ToolbarButtonRenderer
Create a new toolbar button renderer.
-
-
Method Details
-
render
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
Generate the HTML that is needed to create a toolbar button.- Parameters:
btn
- The button informationdisplayText
- If text should be displayed on the button or notdisplayIcon
- If the icon should be displayed on the button or not
-