vmm.actions
Class AbstractActionVMM

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by vmm.actions.AbstractActionVMM
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, ActionItem
Direct Known Subclasses:
ToggleAction

public abstract class AbstractActionVMM
extends javax.swing.AbstractAction
implements ActionItem

A convenience class for making an Action with an accelerator key.

See Also:
Serialized Form

Field Summary
 
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
AbstractActionVMM(java.lang.String name)
          Create an AbstractActionVMM with a specified name, no icon, and no accelerator.
AbstractActionVMM(java.lang.String name, javax.swing.Icon icon)
          Create an AbstractActionVMM with a specified name and icon, and with no accelerator.
AbstractActionVMM(java.lang.String name, java.lang.String accelerator)
          Create an AbstractActionVMM with a specified name, icon, and accelerator.
 
Method Summary
 javax.swing.JMenuItem[] getMenuItems()
          Returns an array containing one item, a JMenuItem created from this AbstractAction.
 
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
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Constructor Detail

AbstractActionVMM

public AbstractActionVMM(java.lang.String name)
Create an AbstractActionVMM with a specified name, no icon, and no accelerator.

Parameters:
name - The name of the Action. (This should be internationalized by the caller.)

AbstractActionVMM

public AbstractActionVMM(java.lang.String name,
                         javax.swing.Icon icon)
Create an AbstractActionVMM with a specified name and icon, and with no accelerator.

Parameters:
name - The name of the Action. (This should be internationalized by the caller.)

AbstractActionVMM

public AbstractActionVMM(java.lang.String name,
                         java.lang.String accelerator)
Create an AbstractActionVMM with a specified name, icon, and accelerator.

Parameters:
name - The name of the Action. (This should be internationalized by the caller.)
accelerator - A String that describes the accelerator, as for the method KeyStroke.getKeyStroke(String), except that the main command key (ctrl or meta) should NOT be included in the description String. If the value of this parameter is null, no accelerator is added. On Macs, "meta" is added to the string; otherwise, "ctrl: is added; this gives the appropriate modifier for tha platform.
Method Detail

getMenuItems

public javax.swing.JMenuItem[] getMenuItems()
Returns an array containing one item, a JMenuItem created from this AbstractAction.

Specified by:
getMenuItems in interface ActionItem