be.ugent.caagt.swirl.undoredo
Class UndoAction
- EventListener, UndoListener
Action which undoes the last change registered with the corresponding
undo manager. When the action is enabled, the
caption is taken from the current
UndoableChange
in the undo list of the associated
UndoManager
.
UndoAction(UndoManager manager, ResourceBundle bundle, String key, Icon icon, Icon mediumIcon, Icon mediumDisabledIcon) - Create an action of this type.
|
void | actionPerformed(ActionEvent e) - Undoes the current undoable change.
|
void | setEnabled(boolean newValue) - Enables/disables the action and changes the caption accordingly.
|
void | undoStateChanged() - Enables or disables the button according to whether
any changes remain to be undone or not.
|
UndoAction
public UndoAction(UndoManager manager,
ResourceBundle bundle,
String key,
Icon icon,
Icon mediumIcon,
Icon mediumDisabledIcon)
Create an action of this type. When the action is enabled, the
the caption is taken from the current
UndoableChange
of the
associated
UndoManager
. . Mnemonic
and accelerator key are taken from the description object as defined
by the parameters
bundle
and
key
.
manager
- Undo manager to which this action appliesbundle
- Resource bundle which contains the description for
this action.key
- Key used for the description of this action in the bundle.icon
- Small icon to be used for menu and standard button decoration (or null)mediumIcon
- Medium size icon to be used for tool bar buttons (or null)mediumDisabledIcon
- Medium size icon to be used for a disabled tool bar buttons (or null)
actionPerformed
public void actionPerformed(ActionEvent e)
Undoes the current undoable change.
- actionPerformed in interface SimpleAction
setEnabled
public void setEnabled(boolean newValue)
Enables/disables the action and changes the caption accordingly.
undoStateChanged
public void undoStateChanged()
Enables or disables the button according to whether
any changes remain to be undone or not.
- undoStateChanged in interface UndoListener