org.openstreetmap.josm.command
Class ChangeCommand
java.lang.Object
org.openstreetmap.josm.command.PseudoCommand
org.openstreetmap.josm.command.Command
org.openstreetmap.josm.command.ChangeCommand
public class ChangeCommand
- extends Command
Command that basically replaces one OSM primitive by another of the
same type.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
osm
private final OsmPrimitive osm
newOsm
private final OsmPrimitive newOsm
ChangeCommand
public ChangeCommand(OsmPrimitive osm,
OsmPrimitive newOsm)
ChangeCommand
public ChangeCommand(OsmDataLayer layer,
OsmPrimitive osm,
OsmPrimitive newOsm)
executeCommand
public boolean executeCommand()
- Description copied from class:
Command
- Executes the command on the dataset. This implementation will remember all
primitives returned by fillModifiedData for restoring them on undo.
- Overrides:
executeCommand
in class Command
fillModifiedData
public void fillModifiedData(java.util.Collection<OsmPrimitive> modified,
java.util.Collection<OsmPrimitive> deleted,
java.util.Collection<OsmPrimitive> added)
- Description copied from class:
Command
- Fill in the changed data this command operates on.
Add to the lists, don't clear them.
- Specified by:
fillModifiedData
in class Command
- Parameters:
modified
- The modified primitivesdeleted
- The deleted primitivesadded
- The added primitives
getDescriptionText
public java.lang.String getDescriptionText()
- Description copied from class:
PseudoCommand
- Provides a description text representing this command.
- Specified by:
getDescriptionText
in class PseudoCommand
getDescriptionIcon
public javax.swing.Icon getDescriptionIcon()
- Description copied from class:
PseudoCommand
- Provides a descriptive icon of this command.
- Overrides:
getDescriptionIcon
in class PseudoCommand
JOSM