be.ugent.caagt.swirl.undoredo
Class RedoAction
- EventListener, UndoListener
Action which reverts the last undo effected by 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
.
RedoAction
public RedoAction(UndoManager manager,
ResourceBundle bundle,
String key,
Icon icon,
Icon mediumIcon,
Icon mediumDisabledIcon)
Create an action of this type. When the action is enabled, 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)
String getCaption
protected @Override String getCaption()
actionPerformed
public void actionPerformed(ActionEvent e)
Redoes the current undoable change.
- actionPerformed in interface SimpleAction
undoStateChanged
public void undoStateChanged()
Enables or disables the button according to whether
any changes remain to be redone or not.
- undoStateChanged in interface UndoListener