|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.refractions.udig.project.command.CompositeCommand
public class CompositeCommand
A collection of Commands that are done as one command. See Gang of Four composite pattern.
Field Summary | |
---|---|
protected java.util.List<MapCommand> |
commands
|
protected java.util.List<MapCommand> |
finalizerCommands
|
Constructor Summary | |
---|---|
CompositeCommand()
|
|
CompositeCommand(java.util.List commands)
Creates a new instance of CompositeCommand |
Method Summary | |
---|---|
MapCommand |
copy()
Instantiates a new copy of the command that will operate in the same manner as the original command. |
java.util.List<MapCommand> |
getCommands()
|
java.util.List<MapCommand> |
getFinalizerCommands()
|
Map |
getMap()
Returns the map if called during execute (or undo command is an undoable command) API mutable? |
java.lang.String |
getName()
Returns the name of the MapCommand |
void |
run(IProgressMonitor monitor)
The method that performs the work of the command. |
void |
setMap(IMap map)
Called when before the command is executed. |
void |
setName(java.lang.String newName)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.List<MapCommand> commands
protected java.util.List<MapCommand> finalizerCommands
Constructor Detail |
---|
public CompositeCommand(java.util.List commands)
commands
- A list of commands to execute.public CompositeCommand()
Method Detail |
---|
public void run(IProgressMonitor monitor) throws java.lang.Exception
Command
Run is called by UDIG when the command is received. Commands are run in a seperate thread.
run
in interface Command
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
net.refractions.udig.project.internal.command.MapCommand#run()
public MapCommand copy()
Command
copy
in interface Command
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
net.refractions.udig.project.internal.command.MapCommand#copy()
public java.lang.String getName()
Command
getName
in interface Command
Command.getName()
public void setName(java.lang.String newName)
public void setMap(IMap map)
MapCommand
setMap
in interface MapCommand
map
- The map executing the command.MapCommand.setMap(IMap)
public Map getMap()
MapCommand
getMap
in interface MapCommand
MapCommand.getMap()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<MapCommand> getCommands()
public java.util.List<MapCommand> getFinalizerCommands()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |