2.17.2: 2011-06-17

net.sf.basedb.clients.web.extensions.toolbar
Class ButtonBean

java.lang.Object
  extended by net.sf.basedb.clients.web.extensions.toolbar.ButtonBean
All Implemented Interfaces:
ButtonAction, Action

public class ButtonBean
extends Object
implements ButtonAction

A simple bean-like implementation of the ButtonAction interface.

Version:
2.7
Author:
nicklas
Last modified
$Date: 2008-09-11 22:05:50 +0200 (Thu, 11 Sep 2008) $

Field Summary
private  String clazz
           
private  boolean enabled
           
private  String icon
           
private  String id
           
private  String onClick
           
private  String style
           
private  String title
           
private  String tooltip
           
private  boolean visible
           
 
Constructor Summary
ButtonBean()
           
 
Method Summary
 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()
          A javascript action that is executed when the user clicks on the button.
 String getStyle()
          Extra CSS style attributes that will be added to the style attribute of the main button tag.
 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 setOnClick(String onClick)
           
 void setStyle(String style)
           
 void setTitle(String title)
           
 void setTooltip(String tooltip)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clazz

private String clazz

icon

private String icon

id

private String id

onClick

private String onClick

style

private String style

title

private String title

tooltip

private String tooltip

enabled

private boolean enabled

visible

private boolean visible
Constructor Detail

ButtonBean

public ButtonBean()
Method Detail

getClazz

public String getClazz()
Description copied from interface: ButtonAction
Class attribute of the main button tag. The default value is "button".

Specified by:
getClazz in interface ButtonAction
Returns:
Class attribute, or null to use the default "button"

getIcon

public String 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 interface ButtonAction
Returns:
A reference to an image, or null if no image should be used

getId

public String 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 interface ButtonAction
Returns:
The ID, or null

getOnClick

public String getOnClick()
Description copied from interface: ButtonAction
A javascript action that is executed when the user clicks on the button.

Specified by:
getOnClick in interface ButtonAction
Returns:
The javascript action

getStyle

public String getStyle()
Description copied from interface: ButtonAction
Extra CSS style attributes that will be added to the style attribute of the main button tag.

Specified by:
getStyle in interface ButtonAction
Returns:
Style attributes, or null

getTitle

public String getTitle()
Description copied from interface: ButtonAction
Get the title of the button.

Specified by:
getTitle in interface ButtonAction

getTooltip

public String 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 interface ButtonAction
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 interface ButtonAction

isVisible

public boolean isVisible()
Description copied from interface: ButtonAction
If the button should be visible or not.

Specified by:
isVisible in interface ButtonAction

setClazz

public void setClazz(String clazz)

setIcon

public void setIcon(String icon)

setId

public void setId(String id)

setOnClick

public void setOnClick(String onClick)

setStyle

public void setStyle(String style)

setTitle

public void setTitle(String title)

setTooltip

public void setTooltip(String tooltip)

setEnabled

public void setEnabled(boolean enabled)

setVisible

public void setVisible(boolean visible)

2.17.2: 2011-06-17