|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Command
A MapCommand in uDig describes an action that modifies the system's model.
Commands are single fire objects. They cannot be used more than once. This is to allow undoable commands to be a normal command, not a special case command.
Commands normally have factories associated with them, but they are also prototypes. The copy method returns a new MapCommand without the undo data. The new MapCommand can safely be executed with no negative side-effects.
A set of possible command
categories are: zoom, pan, cut, paste, addVertex, etc.. Most commands are associated with
tool whose job is to construct the commands. A MapCommand object describes an concrete
change, for example: setBBox(0,0,1,1); setBBox(2,2,3,3) would be a seperate object.
Method Summary | |
---|---|
Command |
copy()
Deprecated. |
java.lang.String |
getName()
Returns the name of the MapCommand |
void |
run(IProgressMonitor monitor)
The method that performs the work of the command. |
Method Detail |
---|
void run(IProgressMonitor monitor) throws java.lang.Exception
Run is called by UDIG when the command is received. Commands are run in a seperate thread.
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?
java.lang.Exception
Command copy()
If the current command has already executed it cannot be used again, but a copy may because a copy should contain none of the state side-effect that execution has on a command
java.lang.String getName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |