be.ugent.caagt.swirl.undoredo
Class UndoCommand
ActionCommand
be.ugent.caagt.swirl.undoredo.UndoRedoCommand
be.ugent.caagt.swirl.undoredo.UndoCommand
- EventListener, UndoListener
public class UndoCommand
extends be.ugent.caagt.swirl.undoredo.UndoRedoCommand
Action command which undoes the last change registered with 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="undo">
<class>be.ugent.caagt.swirl.undoredo.UndoCommand</class>
<face name="undoredo">
<text>_Undo</text>
<accelerator keyStroke="ctrl Z"/>
<description>Undo</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.
UndoCommand(CommandManager commandManager, String id) - Construct an action command of this type.
|
UndoCommand
public UndoCommand(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