All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.webrunner.bab.ActionEnabler

java.lang.Object
   |
   +----com.ibm.webrunner.bab.ActionEnabler

public class ActionEnabler
extends Object
implements Serializable, PropertyChangeListener
This enables Action for derived classes of AbstractButton such as JMenuItem, JButton, JRadioButton, etc. This is basically an adapter that ties an Action with a Button.

The target Action properties such as name, icon, short description, enabled/disabled, etc. are propagated automatically to the Button. If the specified button is used in toolbar and if you do not want to see the text in the button then you must explicitly set the textVisible property to false. Modification(s) History :
09/15/98 - created

Version:
0.1
See Also:
BAction, AbstractButton

Constructor Index

 o ActionEnabler()
Empty constructor

Method Index

 o getButton()
Returns the button associated with this ActionEnabler
 o getTargetAction()
Returns the Action associated with this ActionEnabler
 o isIconVisible()
Is button icon visible ?
 o isTextVisible()
is button text visible ?
 o propertyChange(PropertyChangeEvent)
Syncs the Button state with Action
 o setButton(AbstractButton)
Set the Button on which the Action is enabled
 o setIconVisible(boolean)
Set Icon visible
 o setTargetAction(BAction)
Set the Target Action
 o setTextVisible(boolean)
Set Text visible

Constructors

 o ActionEnabler
 public ActionEnabler()
Empty constructor

Methods

 o setTargetAction
 public void setTargetAction(BAction newAction)
Set the Target Action

 o getTargetAction
 public BAction getTargetAction()
Returns the Action associated with this ActionEnabler

 o setButton
 public void setButton(AbstractButton newButton)
Set the Button on which the Action is enabled

 o getButton
 public AbstractButton getButton()
Returns the button associated with this ActionEnabler

 o propertyChange
 public void propertyChange(PropertyChangeEvent e)
Syncs the Button state with Action

 o setTextVisible
 public void setTextVisible(boolean newTextVisible)
Set Text visible

 o isTextVisible
 public boolean isTextVisible()
is button text visible ?

 o setIconVisible
 public void setIconVisible(boolean newIconVisible)
Set Icon visible

 o isIconVisible
 public boolean isIconVisible()
Is button icon visible ?


All Packages  Class Hierarchy  This Package  Previous  Next  Index