|
||||||||||
| 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.AddCommand
public class AddCommand
A command that adds an osm primitive to a dataset. Keys cannot be added this
way.
See ChangeCommand for comments on relation back references.
| Field Summary | |
|---|---|
private OsmPrimitive |
osm
The primitive to add to the dataset. |
| Constructor Summary | |
|---|---|
AddCommand(OsmDataLayer layer,
OsmPrimitive osm)
Create the command and specify the element to add. |
|
AddCommand(OsmPrimitive osm)
Create the command and specify the element to add. |
|
| 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. |
javax.swing.Icon |
getDescriptionIcon()
Provides a descriptive icon of this command. |
java.lang.String |
getDescriptionText()
Provides a description text representing this command. |
java.util.Collection<OsmPrimitive> |
getParticipatingPrimitives()
Return the primitives that take part in this command. |
void |
undoCommand()
Undoes the command. |
| Methods inherited from class org.openstreetmap.josm.command.Command |
|---|
checkAndConfirmOutlyingOperation, getLayer, getOrig, invalidBecauselayerRemoved |
| Methods inherited from class org.openstreetmap.josm.command.PseudoCommand |
|---|
getChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final OsmPrimitive osm
| Constructor Detail |
|---|
public AddCommand(OsmPrimitive osm)
public AddCommand(OsmDataLayer layer,
OsmPrimitive osm)
| Method Detail |
|---|
public boolean executeCommand()
Command
executeCommand in class Commandpublic void undoCommand()
Command
undoCommand 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<OsmPrimitive> getParticipatingPrimitives()
Command
getParticipatingPrimitives in class Command
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||