public abstract class AbstractJrAction extends AbstractAction
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
AbstractJrAction(String name)
Default constructor.
|
AbstractJrAction(String name,
Component parentComp)
Constructor for actions which need a parent component
e.g.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
actionPerformed(ActionEvent e) |
JMenuItem |
createMenuItem() |
AbstractButton |
createToolboxItem() |
Icon |
getIcon() |
void |
setAcceleratorKey(KeyStroke key)
Set the accelerator key for this action.
|
void |
setIcon(Icon icon) |
void |
setName(String name)
Set the action's name.
|
void |
setShortDescription(String desc)
Set the action's short description.
|
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public AbstractJrAction(String name)
name
- the name of the actionpublic abstract void actionPerformed(ActionEvent e)
public void setName(String name)
name
- the name of this actionpublic void setShortDescription(String desc)
name
- the short description of this actionpublic void setAcceleratorKey(KeyStroke key)
key
- the accelerator keystrokepublic JMenuItem createMenuItem()
public AbstractButton createToolboxItem()
public void setIcon(Icon icon)
public Icon getIcon()