Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## SEdit
Class CommandAction

    java.lang.Object
      javax.swing.AbstractAction
          SEdit.CommandAction

All Implemented Interfaces:
  java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

    public class CommandAction

extends javax.swing.AbstractAction

The CommandAction defines a generic implementation of actionPerformed. Here actionPerformed simply calls the execute method on its command object.

See Also:
  Serialized Form

Field Summary
`protected Executable` | `command`

Fields inherited from class javax.swing.AbstractAction
`changeSupport, enabled`

Fields inherited from interface javax.swing.Action
`ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON`

Constructor Summary
`CommandAction(Executable command, java.lang.String name)` This constructor creates an action without an icon.
`CommandAction(Executable command, java.lang.String name, javax.swing.Icon icon)` This constructor creates an action with an icon.
`CommandAction(Executable command, java.lang.String name, javax.swing.Icon icon, java.lang.String shortdesc, java.lang.String longdesc)` This constructor creates an action with an icon.

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent e)` actionPerformed is what executed the command. actionPerformed is called whenever the action is acted upon.
`protected Executable` | `getCommand()` This method retrieves the encapsulated command.
`protected void` | `setCommand(Executable newValue)` This method sets the action's command object.
`void` | `setLongDescription(java.lang.String v)` Set the value of the long description.
`void` | `setShortDescription(java.lang.String v)` Set the value of the short description.

Methods inherited from class javax.swing.AbstractAction
`addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### command

    protected Executable command

Constructor Detail

### CommandAction

    public CommandAction(Executable command,
                         java.lang.String name)

  This constructor creates an action without an icon.

  Parameters:
    `command` - the command for this action to act upon
    `name` - the action's name

### CommandAction

    public CommandAction(Executable command,
                         java.lang.String name,
                         javax.swing.Icon icon)

  This constructor creates an action with an icon.

  Parameters:
    `command` - the command for this action to act upon
    `name` - the action's name
    `icon` - the action's icon

### CommandAction

    public CommandAction(Executable command,
                         java.lang.String name,
                         javax.swing.Icon icon,
                         java.lang.String shortdesc,
                         java.lang.String longdesc)

  This constructor creates an action with an icon.

  Parameters:
    `command` - the command for this action to act upon
    `name` - the action's name
    `icon` - the action's icon
    `shortdesc` - the action's name
    `longdesc` - the action's name

Method Detail

### setShortDescription

    public void setShortDescription(java.lang.String v)

  Set the value of the short description.

  Parameters:
    `v` - Value to assign to the short escription.

### setLongDescription

    public void setLongDescription(java.lang.String v)

  Set the value of the long description.

  Parameters:
    `v` - Value to assign to the long description.

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent e)

  actionPerformed is what executed the command. actionPerformed is called whenever the action is acted upon.

  Parameters:
    `e` - the action event

### getCommand

    protected final Executable getCommand()

  This method retrieves the encapsulated command.

  Returns:
    Executable

### setCommand

    protected final void setCommand(Executable newValue)

  This method sets the action's command object.

  Parameters:
    `newValue` - the command for this action to act upon

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.