| java.lang.Object javax.swing.AbstractAction org.underworldlabs.swing.actions.BaseActionCommand
BaseActionCommand | public class BaseActionCommand extends AbstractAction (Code) | | This is the base class for the action library. All
actions will inherit from this class. The CommandAction
defines a generic implementation of actionPerformed.
Here actionPerformed simply calls the execute method
on its command object.
A developer can use this type directly by passing in
the command, string, and action. However, convenience
implementations are available that already provide the
string and icon. The developer simply needs to provide
the proper command.
author: Takis Diakoumis version: $Revision: 1.5 $ |
BaseActionCommand | public BaseActionCommand()(Code) | | Constructs a new command
|
BaseActionCommand | public BaseActionCommand(BaseCommand command, String name)(Code) | | This constructor creates an action without an icon.
Parameters: command - the command for this action to act upon Parameters: name - the action's name |
BaseActionCommand | public BaseActionCommand(BaseCommand command, Icon icon)(Code) | | This constructor creates an action with an icon but no name.
(for buttons that require only an icon)
Parameters: command - the command for this action to act upon Parameters: icon - the action's icon |
BaseActionCommand | public BaseActionCommand(BaseCommand command, String name, Icon icon)(Code) | | This constructor creates an action with an icon.
Parameters: command - the command for this action to act upon Parameters: name - the action's name Parameters: icon - the action's icon |
actionPerformed | public void actionPerformed(ActionEvent e)(Code) | | ActionPerformed is what executed the command.
ActionPerformed is called whenever the action is acted upon.
Parameters: e - the action event |
getActionId | public String getActionId()(Code) | | Returns this command's action ID.
the action id |
getCommand | final public BaseCommand getCommand()(Code) | | This method retrieves the encapsulated command.
the command |
hasAccelerator | public boolean hasAccelerator()(Code) | | Returns whether this action has an associated
accelerator key combination.
true | false |
isAcceleratorEditable | public boolean isAcceleratorEditable()(Code) | | |
setAcceleratorEditable | public void setAcceleratorEditable(boolean acceleratorEditable)(Code) | | |
setActionId | public void setActionId(String actionId)(Code) | | Sets this command's action ID to the
specified value.
Parameters: the - action ID |
setCommand | final protected void setCommand(BaseCommand newValue)(Code) | | Sets the action's command object to the specified value.
Parameters: newValue - the command for this action to act upon |
setCommand | public void setCommand(String className)(Code) | | Sets the action's command object using the
class name specified which is loaded using
Class.forName(...) .
Parameters: the - command's fully qualified class name |
|
|