|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.command.PseudoCommand
org.openstreetmap.josm.command.Command
org.openstreetmap.josm.command.SequenceCommand
public class SequenceCommand
A command consisting of a sequence of other commands. Executes the other commands and undo them in reverse order.
Field Summary | |
---|---|
boolean |
continueOnError
|
private java.lang.String |
name
|
private Command[] |
sequence
The command sequenz to be executed. |
private boolean |
sequence_complete
|
Constructor Summary | |
---|---|
SequenceCommand(java.lang.String name,
java.util.Collection<Command> sequenz)
Create the command by specifying the list of commands to execute. |
|
SequenceCommand(java.lang.String name,
Command... sequenz)
Convenient constructor, if the commands are known at compile time. |
Method Summary | |
---|---|
boolean |
executeCommand()
Executes the command on the dataset. |
void |
fillModifiedData(java.util.Collection<OsmPrimitive> modified,
java.util.Collection<OsmPrimitive> deleted,
java.util.Collection<OsmPrimitive> added)
Fill in the changed data this command operates on. |
java.util.Collection<PseudoCommand> |
getChildren()
Returns the subcommands of this command. |
javax.swing.Icon |
getDescriptionIcon()
Provides a descriptive icon of this command. |
java.lang.String |
getDescriptionText()
Provides a description text representing this command. |
Command |
getLastCommand()
|
java.util.Collection<? extends OsmPrimitive> |
getParticipatingPrimitives()
Return the primitives that take part in this command. |
void |
undoCommand()
Undoes the command. |
private void |
undoCommands(int start)
|
Methods inherited from class org.openstreetmap.josm.command.Command |
---|
checkAndConfirmOutlyingOperation, getLayer, getOrig, invalidBecauselayerRemoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Command[] sequence
private boolean sequence_complete
private final java.lang.String name
public boolean continueOnError
Constructor Detail |
---|
public SequenceCommand(java.lang.String name, java.util.Collection<Command> sequenz)
sequenz
- The sequence that should be executed.public SequenceCommand(java.lang.String name, Command... sequenz)
Method Detail |
---|
public boolean executeCommand()
Command
executeCommand
in class Command
public Command getLastCommand()
private void undoCommands(int start)
public void undoCommand()
Command
undoCommand
in class Command
public void fillModifiedData(java.util.Collection<OsmPrimitive> modified, java.util.Collection<OsmPrimitive> deleted, java.util.Collection<OsmPrimitive> added)
Command
fillModifiedData
in class Command
modified
- The modified primitivesdeleted
- The deleted primitivesadded
- The added primitivespublic java.lang.String getDescriptionText()
PseudoCommand
getDescriptionText
in class PseudoCommand
public javax.swing.Icon getDescriptionIcon()
PseudoCommand
getDescriptionIcon
in class PseudoCommand
public java.util.Collection<PseudoCommand> getChildren()
PseudoCommand
getChildren
in class PseudoCommand
public java.util.Collection<? extends OsmPrimitive> getParticipatingPrimitives()
Command
getParticipatingPrimitives
in class Command
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |