net.refractions.udig.project.command
Class UndoRedoCommand
java.lang.Object
net.refractions.udig.project.command.AbstractCommand
net.refractions.udig.project.command.UndoRedoCommand
- All Implemented Interfaces:
- Command, MapCommand, UndoableCommand, UndoableMapCommand
public class UndoRedoCommand
- extends AbstractCommand
- implements UndoableMapCommand
This class will only rollback and redo the command it wraps.
In the case of where commands are required to interact with the UI it is often desirable to execute the command and then put it on the
command stack so that it can be undone.
- Since:
- 1.1.0
- Author:
- Jesse
Method Summary |
java.lang.String |
getName()
Returns the name of the MapCommand |
void |
rollback(IProgressMonitor monitor)
Rollback the effects of the command |
void |
run(IProgressMonitor monitor)
The method that performs the work of the command. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.refractions.udig.project.command.Command |
copy |
Methods inherited from interface net.refractions.udig.project.command.Command |
copy |
UndoRedoCommand
public UndoRedoCommand(UndoableMapCommand addVertexCommand)
getName
public java.lang.String getName()
- Description copied from interface:
Command
- Returns the name of the MapCommand
- Specified by:
getName
in interface Command
- Returns:
- The name of the command.
run
public void run(IProgressMonitor monitor)
throws java.lang.Exception
- Description copied from interface:
Command
- The method that performs the work of the command.
Run is called by UDIG when the command is received. Commands are run in a seperate thread.
- Specified by:
run
in interface Command
- Parameters:
monitor
- A progress monitor used by the command to report on its internal state. API
how is this associated with a Thread? is it a Thread?
- Throws:
java.lang.Exception
rollback
public void rollback(IProgressMonitor monitor)
throws java.lang.Exception
- Description copied from interface:
UndoableCommand
- Rollback the effects of the command
- Specified by:
rollback
in interface UndoableCommand
- Throws:
java.lang.Exception