dsto.dfc.swing.undo
Class CmdRedo

java.lang.Object
  extended by dsto.dfc.swing.commands.AbstractCommand
      extended by dsto.dfc.swing.commands.AbstractMutableCommand
          extended by dsto.dfc.swing.undo.AbstractUndoableCommand
              extended by dsto.dfc.swing.undo.CmdRedo
All Implemented Interfaces:
Command, Iconic, EditExceptionPolicy, Copyable, PropertyEventSource, ActionListener, Cloneable, EventListener
Direct Known Subclasses:
CmdRedoTo

public class CmdRedo
extends AbstractUndoableCommand

Command to invoke a single redo () on the MonitoredUndoManager.

Version:
$Revision$
Author:
Derek Weber

Field Summary
static Icon ICON
           
 
Fields inherited from class dsto.dfc.swing.undo.AbstractUndoableCommand
cursorUpdatePolicy, exceptionHandler, name, undoManager
 
Fields inherited from class dsto.dfc.swing.commands.AbstractMutableCommand
listeners
 
Fields inherited from class dsto.dfc.swing.commands.AbstractCommand
displayName, icon
 
Fields inherited from interface dsto.dfc.swing.icons.Iconic
NULL_ICON
 
Constructor Summary
CmdRedo(MonitoredUndoManager undoManager)
           
 
Method Summary
 void execute(UndoableEdit edit)
          Implement this method with the command's behaviour.
 KeyStroke getAccelerator()
          The keyboard accelerator is Ctrl-R.
 String getDescription()
          A short description of the command, suitable for a tooltip or use in a status panel.
 Icon getIcon()
          The small (16x16) icon for the object.
 char getMnemonic()
          Get a character shortcut for the command (eg for use on a menu).
 UndoableEdit selectedEdit()
          Returns the next edit to be redone.
 void skip()
          Implement this command to determine how to skip an edit which causes an exception.
 void updateEnabled()
          This checks that the selected edit is in the MonitoredUndoManager's redo list.
 
Methods inherited from class dsto.dfc.swing.undo.AbstractUndoableCommand
execute, getGroupInView, getName, handleNonExecutableEdit, isInteractive, listenForEnablingEvents, listenForEnablingEvents, pause, retry, stopListeningForEnablingEvents
 
Methods inherited from class dsto.dfc.swing.commands.AbstractMutableCommand
addPropertyChangeListener, clone, isEnabled, removePropertyChangeListener, setEnabled, setIcon
 
Methods inherited from class dsto.dfc.swing.commands.AbstractCommand
actionPerformed, canReplace, getDefaultDisplayName, getDisplayName, getLargeIcon, getLogString, setDisplayName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ICON

public static final Icon ICON
Constructor Detail

CmdRedo

public CmdRedo(MonitoredUndoManager undoManager)
Method Detail

getIcon

public Icon getIcon()
Description copied from interface: Iconic
The small (16x16) icon for the object. May be null if no small icon is available.

Specified by:
getIcon in interface Iconic
Overrides:
getIcon in class AbstractCommand

getMnemonic

public char getMnemonic()
Description copied from interface: Command
Get a character shortcut for the command (eg for use on a menu). May return 0 for no mnemonic.

Specified by:
getMnemonic in interface Command
Specified by:
getMnemonic in class AbstractCommand

execute

public void execute(UndoableEdit edit)
Description copied from class: AbstractUndoableCommand
Implement this method with the command's behaviour.

Specified by:
execute in class AbstractUndoableCommand

selectedEdit

public UndoableEdit selectedEdit()
Returns the next edit to be redone.

Specified by:
selectedEdit in class AbstractUndoableCommand

getDescription

public String getDescription()
Description copied from interface: Command
A short description of the command, suitable for a tooltip or use in a status panel.

Specified by:
getDescription in interface Command
Specified by:
getDescription in class AbstractCommand

updateEnabled

public void updateEnabled()
This checks that the selected edit is in the MonitoredUndoManager's redo list.

Specified by:
updateEnabled in class AbstractUndoableCommand

skip

public void skip()
Description copied from class: AbstractUndoableCommand
Implement this command to determine how to skip an edit which causes an exception.

Specified by:
skip in interface EditExceptionPolicy
Specified by:
skip in class AbstractUndoableCommand

getAccelerator

public KeyStroke getAccelerator()
The keyboard accelerator is Ctrl-R.

Specified by:
getAccelerator in interface Command
Overrides:
getAccelerator in class AbstractCommand


Copyright © 2008 Commonwealth of Australia