All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.webrunner.bab.BAction

java.lang.Object
   |
   +----com.sun.java.swing.AbstractAction
           |
           +----com.ibm.webrunner.bab.BAction

public class BAction
extends AbstractAction
implements Serializable
BAction is a component that implements the swing's Action. This separates the application logic that is performed on this Action from the UI aspects of the action itself.

This supports the setters and getters for Action's properties such as Name, Icon, Short Description and Long Description. The property enabledInApplet if set to false,this action will be disabled when run as an applet. This is set to true by default.

The action performed by this is specified by adding an ActionListener to this BAction. If an undoable action/command is to be performed then a BCommand object must be implemented and the command itself must added to the BABApp in the ActionListener.

Modification(s) History :
09/15/98 - created

Version:
0.1
See Also:
BCommand, AbstractAction

Variable Index

 o listenerList

Constructor Index

 o BAction()
No arg constructor

Method Index

 o actionPerformed(ActionEvent)
 o addActionListener(ActionListener)
adds an ActionListener to the button
 o getActionName()
Returns Action name
 o getBABApp()
Returns the BAB App
 o getBABContext()
Returns current BABContext.
 o getIcon()
Return the Action's Icon
 o getLongDescription()
Return the Action's Long description
 o getShortDescription()
Return the Action's short descriptor
 o isEnabledInApplet()
Should this action be enabled when running as an Applet ?
 o isSelected()
Return if this is selected.
 o removeActionListener(ActionListener)
removes an ActionListener from the button
 o setActionName(String)
Set a name for the action
 o setEnabledInApplet(boolean)
Set enabledInApplet
 o setIcon(Icon)
Set an Icon for the action
 o setLongDescription(String)
Set long description for the Action
 o setSelected(boolean)
Set selected.
 o setShortDescription(String)
Set short description for the Action

Variables

 o listenerList
 protected EventListenerList listenerList

Constructors

 o BAction
 public BAction()
No arg constructor

Methods

 o actionPerformed
 public void actionPerformed(ActionEvent e)
Overrides:
actionPerformed in class AbstractAction
 o setEnabledInApplet
 public void setEnabledInApplet(boolean newEnabledInApplet)
Set enabledInApplet

 o isEnabledInApplet
 public boolean isEnabledInApplet()
Should this action be enabled when running as an Applet ?

 o getBABApp
 public BABApp getBABApp()
Returns the BAB App

 o setActionName
 public void setActionName(String newActionName)
Set a name for the action

 o getActionName
 public String getActionName()
Returns Action name

 o setIcon
 public void setIcon(Icon newIcon)
Set an Icon for the action

 o getIcon
 public Icon getIcon()
Return the Action's Icon

 o setShortDescription
 public void setShortDescription(String newShortDescription)
Set short description for the Action

 o getShortDescription
 public String getShortDescription()
Return the Action's short descriptor

 o setLongDescription
 public void setLongDescription(String newLongDescription)
Set long description for the Action

 o getLongDescription
 public String getLongDescription()
Return the Action's Long description

 o getBABContext
 public BABContext getBABContext()
Returns current BABContext. This is normally called from this action's actionPerformed() method

 o setSelected
 public void setSelected(boolean newSelected)
Set selected. This is used for actions associated with toggle buttons

 o isSelected
 public boolean isSelected()
Return if this is selected. This is used for actions associated with toggle buttons

 o addActionListener
 public void addActionListener(ActionListener l)
adds an ActionListener to the button

 o removeActionListener
 public void removeActionListener(ActionListener l)
removes an ActionListener from the button


All Packages  Class Hierarchy  This Package  Previous  Next  Index