be.ugent.caagt.swirl.undoredo
Class RedoCommand
ActionCommand
be.ugent.caagt.swirl.undoredo.UndoRedoCommand
be.ugent.caagt.swirl.undoredo.RedoCommand
- EventListener, UndoListener
public class RedoCommand
extends be.ugent.caagt.swirl.undoredo.UndoRedoCommand
Action command which reverts the last change which was undone by the corresponding
undo manager. The undo manager is assumed to be installed as an attribute to
the command manager with key
UndoManager.class.getName()
Whenever the state of the undo manager changes, caption and description of
the 'undoredo' face of the command are changed. Use face inheritance to
propagate either the caption or the description to the appropriate menu or toolbar
faces, as in the following example:
<command id="redo">
<class>be.ugent.caagt.swirl.undoredo.RedoCommand</class>
<face name="undoredo">
<text>_Redo</text>
<accelerator keyStroke="ctrl Y"/>
<description>Redo</description>
</face>
<face name="menu" extends="[undoredo]">
<description/>
</face>
<face name="toolbar" extends="[undoredo]">
<text/>
<icon type="classpath">...</icon>
</face>
</command>
The initial text and description of the 'undoredo' face
are used whenever the command is disabled.
Important note: work on this part of the Swirl library will be
discontinued because unfortunately newer versions
of the
GUI commands framework will no longer be available as
open source.
In due course this class will become deprecated and will eventually be
removed from the library.
RedoCommand(CommandManager commandManager, String id) - Construct an action command of this type.
|
protected String | getCaption()
|
protected void | handleExecute()
|
void | undoStateChanged() - Called after a change of state in the
UndoManager
which is listened to, i.e., when undoable changes are added or removed
from the list, when the list position is changed and when
the marked position changes.
|
RedoCommand
public RedoCommand(CommandManager commandManager,
String id)
Construct an action command of this type.
getCaption
protected String getCaption()
- getCaption in interface be.ugent.caagt.swirl.undoredo.UndoRedoCommand
handleExecute
protected void handleExecute()
- handleExecute in interface be.ugent.caagt.swirl.undoredo.UndoRedoCommand
undoStateChanged
public void undoStateChanged()
Called after a change of state in the
UndoManager
which is listened to, i.e., when undoable changes are added or removed
from the list, when the list position is changed and when
the marked position changes.
- undoStateChanged in interface UndoListener
- undoStateChanged in interface be.ugent.caagt.swirl.undoredo.UndoRedoCommand