|
||||||||||
| 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.ChangePropertyCommand
public class ChangePropertyCommand
Command that manipulate the key/value structure of several objects. Manages deletion, adding and modify of values and keys.
| Field Summary | |
|---|---|
private java.util.List<OsmPrimitive> |
objects
All primitives that are affected with this command. |
private java.util.AbstractMap<java.lang.String,java.lang.String> |
tags
Key and value pairs. |
| Constructor Summary | |
|---|---|
ChangePropertyCommand(java.util.Collection<? extends OsmPrimitive> objects,
java.util.AbstractMap<java.lang.String,java.lang.String> tags)
Creates a command to change multiple properties of multiple objects |
|
ChangePropertyCommand(java.util.Collection<? extends OsmPrimitive> objects,
java.lang.String key,
java.lang.String value)
Creates a command to change one property of multiple objects |
|
ChangePropertyCommand(OsmPrimitive object,
java.lang.String key,
java.lang.String value)
Creates a command to change on property of one object |
|
| 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. |
private void |
init(java.util.Collection<? extends OsmPrimitive> objects)
Initialize the instance by finding what objects will be modified |
| Methods inherited from class org.openstreetmap.josm.command.Command |
|---|
checkAndConfirmOutlyingOperation, getLayer, getOrig, getParticipatingPrimitives, invalidBecauselayerRemoved, undoCommand |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.util.List<OsmPrimitive> objects
private final java.util.AbstractMap<java.lang.String,java.lang.String> tags
null, delete all key references with the given
key. Otherwise, change the properties of all objects to the given value or create keys of
those objects that do not have the key yet.
| Constructor Detail |
|---|
public ChangePropertyCommand(java.util.Collection<? extends OsmPrimitive> objects,
java.util.AbstractMap<java.lang.String,java.lang.String> tags)
objects - the objects to modifytags - the properties to set
public ChangePropertyCommand(java.util.Collection<? extends OsmPrimitive> objects,
java.lang.String key,
java.lang.String value)
objects - the objects to modifykey - the key of the property to setvalue - the value of the key to set
public ChangePropertyCommand(OsmPrimitive object,
java.lang.String key,
java.lang.String value)
object - the object to modifykey - the key of the property to setvalue - the value of the key to set| Method Detail |
|---|
private void init(java.util.Collection<? extends OsmPrimitive> objects)
objects - the objects to (possibly) modifypublic boolean executeCommand()
Command
executeCommand 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 Commandmodified - The modified primitivesdeleted - The deleted primitivesadded - The added primitivespublic java.lang.String getDescriptionText()
PseudoCommand
getDescriptionText in class PseudoCommandpublic javax.swing.Icon getDescriptionIcon()
PseudoCommand
getDescriptionIcon in class PseudoCommandpublic java.util.Collection<PseudoCommand> getChildren()
PseudoCommand
getChildren in class PseudoCommand
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||