public class ToolbarButtonRenderer extends java.lang.Object implements Renderer<ButtonAction>
JspContext
).Modifier and Type | Field and Description |
---|---|
private JspContext |
context |
Constructor and Description |
---|
ToolbarButtonRenderer()
Create a new "standalone" toolbar button renderer.
|
ToolbarButtonRenderer(JspContext context)
Create a new toolbar button renderer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHTML(ButtonAction btn,
boolean displayText,
boolean displayIcon)
Generate the HTML that is needed to create a toolbar button.
|
void |
render(ButtonAction btn)
Generates a toolbar button.
|
private JspContext context
public ToolbarButtonRenderer()
getHTML(ButtonAction, boolean, boolean)
to
generate the HTML. Do not use render(ButtonAction)
since
that requires a JspContext
.public ToolbarButtonRenderer(JspContext context)
public void render(ButtonAction btn)
render
in interface Renderer<ButtonAction>
btn
- The action to renderpublic java.lang.String getHTML(ButtonAction btn, boolean displayText, boolean displayIcon)
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