Class ButtonBean
java.lang.Object
net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport
net.sf.basedb.clients.web.extensions.toolbar.ButtonBean
- All Implemented Interfaces:
DynamicActionAttributes
,ButtonAction
,Action
public class ButtonBean extends DynamicActionAttributeSupport implements ButtonAction
A simple bean-like implementation of the
ButtonAction
interface.- Version:
- 2.7
- Author:
- nicklas
- Last modified
- $Date: 2014-12-09 13:03:40 +0100 (ti, 09 dec 2014) $
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ButtonBean()
-
Method Summary
Modifier and Type Method Description 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
getStyle()
Extra CSS style attributes that will be added to thestyle
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
setIcon(String icon)
void
setId(String id)
void
setStyle(String style)
void
setTabIndex(int tabIndex)
void
setTitle(String title)
void
setTooltip(String tooltip)
void
setVisible(boolean visible)
Methods inherited from class net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport
addAttributes, getAttributesString, getDynamicActionAttributes, setDynamicActionAttributesSource, setDynamicAttribute
-
Field Details
-
clazz
-
icon
-
id
-
style
-
title
-
tooltip
-
enabled
private boolean enabled -
visible
private boolean visible -
tabIndex
private int tabIndex
-
-
Constructor Details
-
ButtonBean
public ButtonBean()
-
-
Method Details
-
getClazz
Description copied from interface:ButtonAction
Class attribute of the main button tag. The default value is "button".- Specified by:
getClazz
in interfaceButtonAction
- Returns:
- Class attribute, or null to use the default "button"
-
getIcon
Description copied from interface:ButtonAction
Get a reference to an image that will be displayed in the menu. It is recommended that the image is 16x16 pixels to line up with the other icons used by the BASE.- Specified by:
getIcon
in interfaceButtonAction
- Returns:
- A reference to an image, or null if no image should be used
-
getId
Description copied from interface:ButtonAction
ID attribute of the main button tag. You need to set this value to reference the button in a javascript.- Specified by:
getId
in interfaceButtonAction
- Returns:
- The ID, or null
-
getStyle
Description copied from interface:ButtonAction
Extra CSS style attributes that will be added to thestyle
attribute of the main button tag.- Specified by:
getStyle
in interfaceButtonAction
- Returns:
- Style attributes, or null
-
getTitle
Description copied from interface:ButtonAction
Get the title of the button.- Specified by:
getTitle
in interfaceButtonAction
-
getTooltip
Description copied from interface:ButtonAction
A tooltip that is shown as a yellow popup when the user points the mouse at the button.- Specified by:
getTooltip
in interfaceButtonAction
- Returns:
- The tooltip or null to not display any tooltip
-
isEnabled
public boolean isEnabled()Description copied from interface:ButtonAction
If the button should be enabled or disabled.- Specified by:
isEnabled
in interfaceButtonAction
-
isVisible
public boolean isVisible()Description copied from interface:ButtonAction
If the button should be visible or not.- Specified by:
isVisible
in interfaceButtonAction
-
getTabIndex
public int getTabIndex()Description copied from interface:ButtonAction
Get the tab index used to control focus order when tabbing. Use -1 to disable.- Specified by:
getTabIndex
in interfaceButtonAction
-
setClazz
-
setIcon
-
setId
-
setStyle
-
setTitle
-
setTooltip
-
setEnabled
public void setEnabled(boolean enabled) -
setVisible
public void setVisible(boolean visible) -
setTabIndex
public void setTabIndex(int tabIndex)
-