public class ChangePropertyKeyCommand extends Command
Command.OldNodeState| Modifier and Type | Field and Description |
|---|---|
private String |
key
The key that is subject to change.
|
private String |
newKey
The mew key.
|
private List<OsmPrimitive> |
objects
All primitives, that are affected with this command.
|
| Constructor and Description |
|---|
ChangePropertyKeyCommand(Collection<? extends OsmPrimitive> objects,
String key,
String newKey)
Constructs a new
ChangePropertyKeyCommand. |
ChangePropertyKeyCommand(OsmPrimitive object,
String key,
String newKey)
Constructs a new
ChangePropertyKeyCommand. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
executeCommand()
Executes the command on the dataset.
|
void |
fillModifiedData(Collection<OsmPrimitive> modified,
Collection<OsmPrimitive> deleted,
Collection<OsmPrimitive> added)
Fill in the changed data this command operates on.
|
Collection<PseudoCommand> |
getChildren()
Returns the subcommands of this command.
|
Icon |
getDescriptionIcon()
Provides a descriptive icon of this command.
|
String |
getDescriptionText()
Provides a description text representing this command.
|
checkAndConfirmOutlyingOperation, getLayer, getOrig, getParticipatingPrimitives, invalidBecauselayerRemoved, undoCommandprivate final List<OsmPrimitive> objects
public ChangePropertyKeyCommand(OsmPrimitive object, String key, String newKey)
ChangePropertyKeyCommand.object - the object subject to change replacementkey - The key to replacenewKey - the new value of the keypublic ChangePropertyKeyCommand(Collection<? extends OsmPrimitive> objects, String key, String newKey)
ChangePropertyKeyCommand.objects - all objects subject to change replacementkey - The key to replacenewKey - the new value of the keypublic boolean executeCommand()
CommandexecuteCommand in class Commandpublic void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added)
CommandfillModifiedData in class Commandmodified - The modified primitivesdeleted - The deleted primitivesadded - The added primitivespublic String getDescriptionText()
PseudoCommandgetDescriptionText in class PseudoCommandpublic Icon getDescriptionIcon()
PseudoCommandgetDescriptionIcon in class PseudoCommandpublic Collection<PseudoCommand> getChildren()
PseudoCommandgetChildren in class PseudoCommand