abbot.editor.actions
Class EditorAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--abbot.editor.actions.EditorAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EditorConstants, EventListener, Serializable
Direct Known Subclasses:
EditorToggleAction

public class EditorAction
extends AbstractAction
implements EditorConstants

Encapsulate GUI attributes for an editor action.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.AbstractAction
AbstractAction.ArrayTable
 
Inner classes inherited from class abbot.editor.EditorConstants
EditorConstants.Accelerator
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface abbot.editor.EditorConstants
ABBOT_IMAGE_DIR, LARGE_ICON, menuShortcutMask, menuShortcutString, MI_ABOUT, MI_ACTION_COUNT, MI_ASSERT_DYNAMIC, MI_CAPTURE_DYNAMIC, MI_CLEAR, MI_CLOSE, MI_COUNT, MI_CUT, MI_DELETE, MI_DUPLICATE, MI_EXIT, MI_EXPORT_HIERARCHY, MI_FORK, MI_GETVMARGS, MI_GROUP, MI_INSERT_ANNOTATION, MI_INSERT_CALL, MI_INSERT_COMMENT, MI_INSERT_COUNT, MI_INSERT_DYNAMIC, MI_INSERT_FIRST, MI_INSERT_LAST, MI_INSERT_LAUNCH, MI_INSERT_SAMPLE, MI_INSERT_SCRIPT, MI_INSERT_SEQUENCE, MI_INSERT_TERMINATE, MI_LAUNCH, MI_MOVE_DOWN, MI_MOVE_UP, MI_NEW, MI_OPEN, MI_RENAME, MI_RUN, MI_RUNSELECTED, MI_RUNTO, MI_SAVE, MI_SAVE_AS, MI_SELECT_TESTSUITE, MI_SLOW, MI_STOP_ON_ERROR, MI_STOP_ON_FAILURE, MI_TERMINATE, MI_TOGGLE_FIRST, MI_TOGGLE_LAST, MI_WAIT_DYNAMIC
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
EditorAction(int id, String key, ActionListener al)
           
 
Method Summary
 void actionPerformed(ActionEvent ev)
           
 KeyStroke getAcceleratorKey()
           
 ImageIcon getIcon(String name, int size)
          Returns the Icon associated with the given name from the available resources.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorAction

public EditorAction(int id,
                    String key,
                    ActionListener al)
Method Detail

getAcceleratorKey

public KeyStroke getAcceleratorKey()

actionPerformed

public void actionPerformed(ActionEvent ev)
Overrides:
actionPerformed in class AbstractAction

getIcon

public ImageIcon getIcon(String name,
                         int size)
Returns the Icon associated with the given name from the available resources.
Parameters:
name - Base name of the icon file e.g., help for help16.gif
size - Size in pixels of the icon from the filename, or zero if none, e.g. 16 for help16.gif or 0 for help.gif.
Returns:
an ImageIcon or null if no corresponding icon resource is found.


Copyright © 2002-2003 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge