public class ChangePropertyKeyCommand extends Command
Command.OldNodeState| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
key
The key that is subject to change.
|
private java.lang.String |
newKey
The mew key.
|
private java.util.List<? extends OsmPrimitive> |
objects
All primitives, that are affected with this command.
|
| Constructor and Description |
|---|
ChangePropertyKeyCommand(java.util.Collection<? extends OsmPrimitive> objects,
java.lang.String key,
java.lang.String newKey)
Constructs a new
ChangePropertyKeyCommand. |
ChangePropertyKeyCommand(OsmPrimitive object,
java.lang.String key,
java.lang.String newKey)
Constructs a new
ChangePropertyKeyCommand. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
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.
|
int |
hashCode() |
checkAndConfirmOutlyingOperation, getAffectedDataSet, getLayer, getOrig, getParticipatingPrimitives, invalidateAffectedLayers, invalidBecauselayerRemoved, undoCommandprivate final java.util.List<? extends OsmPrimitive> objects
private final java.lang.String key
private final java.lang.String newKey
public ChangePropertyKeyCommand(OsmPrimitive object, java.lang.String key, java.lang.String newKey)
ChangePropertyKeyCommand.object - the object subject to change replacementkey - The key to replacenewKey - the new value of the keypublic ChangePropertyKeyCommand(java.util.Collection<? extends OsmPrimitive> objects, java.lang.String key, java.lang.String newKey)
ChangePropertyKeyCommand.objects - all objects subject to change replacementkey - The key to replacenewKey - the new value of the keypublic boolean executeCommand()
CommandThe layer should be invalidated after execution so that it can be re-painted.
executeCommand in class CommandCommand.invalidateAffectedLayers()public 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 PseudoCommand