public class FixedButtonFactory extends AbstractJspActionFactory<ButtonAction> implements ButtonAction
The button is by default both visible and enabled. Use the setter
method to change the properties. Changes to the properties are immediately
visible in the menu items returned from the getActions(InvokationContext)
method.
If the extension point supports scripts and stylesheets, use the
AbstractJspFactory.setScript(String)
and AbstractJspFactory.setStylesheet(String)
methods.
Each call to these methods will add the argument to a set. Use
the AbstractJspFactory.getScripts()
and AbstractJspFactory.getStylesheets()
methods to gain
access to the sets, for example, to remove added items.
Modifier and Type | Field and Description |
---|---|
private ButtonAction[] |
actions |
private String |
clazz |
private boolean |
enabled |
private String |
icon |
private String |
id |
private String |
onClick
Deprecated.
|
private String |
style |
private int |
tabIndex |
private String |
title |
private String |
tooltip |
private boolean |
visible |
Constructor and Description |
---|
FixedButtonFactory()
Create a new factory instance.
|
Modifier and Type | Method and Description |
---|---|
ButtonAction[] |
getActions(InvokationContext context)
This method may be called one or several times for each request.
|
String |
getClazz()
Class attribute of the main button tag.
|
String |
getIcon()
Get a reference to an image that will be displayed in the menu.
|
String |
getId()
ID attribute of the main button tag.
|
String |
getOnClick()
Deprecated.
|
String |
getStyle()
Extra CSS style attributes that will be added to the
style attribute of the main button tag. |
int |
getTabIndex()
Get the tab index used to control focus order when tabbing.
|
String |
getTitle()
Get the title of the button.
|
String |
getTooltip()
A tooltip that is shown as a yellow popup when the
user points the mouse at the button.
|
boolean |
isEnabled()
If the button should be enabled or disabled.
|
boolean |
isVisible()
If the button should be visible or not.
|
void |
setClazz(String clazz) |
void |
setEnabled(boolean enabled) |
void |
setEnabled(String enabled) |
void |
setIcon(String icon) |
void |
setId(String id) |
void |
setOnClick(String onClick)
Deprecated.
|
void |
setStyle(String style) |
void |
setTabIndex(int tabIndex) |
void |
setTitle(String title) |
void |
setTooltip(String tooltip) |
void |
setVisible(boolean visible) |
void |
setVisible(String visible) |
prepareContext
getDynamicActionAttributes, getParameter, getScripts, getStylesheets, prepareContext, setParameter, setScript, setStylesheet
private ButtonAction[] actions
private String id
private String clazz
private String icon
@Deprecated private String onClick
private String style
private String title
private String tooltip
private boolean enabled
private boolean visible
private int tabIndex
public ButtonAction[] getActions(InvokationContext context)
ActionFactory
getActions
in interface ActionFactory<ButtonAction>
context
- The current invokation contextpublic String getClazz()
ButtonAction
getClazz
in interface ButtonAction
public String getId()
ButtonAction
getId
in interface ButtonAction
public String getIcon()
ButtonAction
getIcon
in interface ButtonAction
@Deprecated public String getOnClick()
ButtonAction
getOnClick
in interface ButtonAction
public String getStyle()
ButtonAction
style
attribute of the main button tag.getStyle
in interface ButtonAction
public String getTitle()
ButtonAction
getTitle
in interface ButtonAction
public String getTooltip()
ButtonAction
getTooltip
in interface ButtonAction
public boolean isEnabled()
ButtonAction
isEnabled
in interface ButtonAction
public boolean isVisible()
ButtonAction
isVisible
in interface ButtonAction
public int getTabIndex()
ButtonAction
getTabIndex
in interface ButtonAction
public void setClazz(String clazz)
@VariableSetter @PathSetter public void setIcon(String icon)
public void setId(String id)
@VariableSetter @Deprecated public void setOnClick(String onClick)
public void setStyle(String style)
public void setTitle(String title)
public void setTooltip(String tooltip)
public void setEnabled(boolean enabled)
public void setEnabled(String enabled)
public void setVisible(boolean visible)
public void setVisible(String visible)
public void setTabIndex(int tabIndex)