cdox.gui.action
Class CDoxAction
java.lang.Object
javax.swing.AbstractAction
cdox.gui.action.CDoxAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, Configurable, java.util.EventListener, java.io.Serializable
- Direct Known Subclasses:
- EditAction, EditBildAction, EditPane.TabListener, FileAction, HelpAction, InsertAction, TextAction
- public abstract class CDoxAction
- extends javax.swing.AbstractAction
- implements Configurable
This is the abstract superclass of all CDox actions. It implements the interface
Configurable to provide easy configuration.
- Version:
- May 16th 2002
- Author:
- Rutger Bezema, Andreas Schmitz
- See Also:
Configurable
,
Serialized Form
Field Summary |
protected CDoxFrame |
cFrame
The CDoxFrame. |
protected javax.swing.JMenuItem |
menuItem
The menu Item which can be used to define the KeyStroke. |
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 |
protected |
CDoxAction(CDoxFrame f,
java.lang.String name,
java.lang.String tooltip)
Constructor. |
Method Summary |
void |
configure(java.lang.Object o)
Inherited from Configurable. |
void |
setMenuItem(javax.swing.JMenuItem menuItem)
Sets the menu item for this command. |
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 |
menuItem
protected javax.swing.JMenuItem menuItem
- The menu Item which can be used to define the KeyStroke.
cFrame
protected CDoxFrame cFrame
- The CDoxFrame.
CDoxAction
protected CDoxAction(CDoxFrame f,
java.lang.String name,
java.lang.String tooltip)
- Constructor.
- Parameters:
f
- the CDoxFrame this action belongs toname
- a name for this actiontooltip
- the possible tooltip on this Action, which can be null.
setMenuItem
public void setMenuItem(javax.swing.JMenuItem menuItem)
- Sets the menu item for this command. This is only used to change the key stroke
later on.
- Parameters:
menuItem
- the menu item whose accelerator should be set when configuring this
action.
configure
public void configure(java.lang.Object o)
- Inherited from Configurable. Sets the short-cut key to the KeyStroke which is in
Object. If this Action has a MenuItem, the keyStroke is also set for this one.
- Specified by:
configure
in interface Configurable
- Parameters:
o
- the KeyStroke-Object.