public class ChangePropertyKeyCommand extends Command
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
ChangePropertyKeyCommand.SinglePrimitivePseudoCommand |
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.
|
IS_INCOMPLETE, IS_OK, IS_OUTSIDE| Constructor and Description |
|---|
ChangePropertyKeyCommand(java.util.Collection<? extends OsmPrimitive> objects,
java.lang.String key,
java.lang.String newKey)
Constructs a new
ChangePropertyKeyCommand. |
ChangePropertyKeyCommand(DataSet ds,
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() |
checkOutlyingOrIncompleteOperation, ensurePrimitivesAreInDataset, getAffectedDataSet, getOrig, getParticipatingPrimitives, 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 replacement. Must not be null, and belong to a data setkey - 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 replacement. Must not be null or empty, and objects must belong to a data setkey - The key to replacenewKey - the new value of the keyjava.lang.NullPointerException - if objects is null or contain null itemjava.util.NoSuchElementException - if objects is emptypublic ChangePropertyKeyCommand(DataSet ds, java.util.Collection<? extends OsmPrimitive> objects, java.lang.String key, java.lang.String newKey)
ChangePropertyKeyCommand.ds - The target data set. Must not be nullobjects - all objects subject to change replacement.key - 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 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()
PseudoCommandpublic javax.swing.Icon getDescriptionIcon()
PseudoCommandpublic java.util.Collection<PseudoCommand> getChildren()
PseudoCommand