public class SequenceCommand extends Command
Command.OldNodeState| Modifier and Type | Field and Description |
|---|---|
boolean |
continueOnError
Determines if the sequence execution should continue after one of its commands fails.
|
private java.lang.String |
name |
private Command[] |
sequence
The command sequence to be executed.
|
private boolean |
sequenceComplete |
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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()
Returns the last command.
|
java.util.Collection<? extends OsmPrimitive> |
getParticipatingPrimitives()
Return the primitives that take part in this command.
|
protected void |
setSequence(Command[] sequence) |
protected void |
setSequenceComplete(boolean sequenceComplete) |
void |
undoCommand()
Undoes the command.
|
protected void |
undoCommands(int start) |
checkAndConfirmOutlyingOperation, getLayer, getOrig, invalidBecauselayerRemovedprivate boolean sequenceComplete
private final java.lang.String name
public boolean continueOnError
public SequenceCommand(java.lang.String name, java.util.Collection<Command> sequenz)
name - The description textsequenz - The sequence that should be executed.public SequenceCommand(java.lang.String name, Command... sequenz)
name - The description textsequenz - The sequence that should be executed.public boolean executeCommand()
CommandexecuteCommand in class Commandpublic Command getLastCommand()
null if the sequence is empty.protected final void undoCommands(int start)
public void undoCommand()
CommandundoCommand in class Commandpublic void fillModifiedData(java.util.Collection<OsmPrimitive> modified, java.util.Collection<OsmPrimitive> deleted, java.util.Collection<OsmPrimitive> added)
CommandfillModifiedData in class Commandmodified - The modified primitivesdeleted - The deleted primitivesadded - The added primitivespublic java.lang.String getDescriptionText()
PseudoCommandgetDescriptionText in class PseudoCommandpublic javax.swing.Icon getDescriptionIcon()
PseudoCommandgetDescriptionIcon in class PseudoCommandpublic java.util.Collection<PseudoCommand> getChildren()
PseudoCommandgetChildren in class PseudoCommandpublic java.util.Collection<? extends OsmPrimitive> getParticipatingPrimitives()
CommandgetParticipatingPrimitives in class Commandprotected final void setSequence(Command[] sequence)
protected final void setSequenceComplete(boolean sequenceComplete)