public class AddCommand extends Command
ChangeCommand for comments on relation back references.Command.OldNodeState| Modifier and Type | Field and Description |
|---|---|
private OsmPrimitive |
osm
The primitive to add to the dataset.
|
IS_INCOMPLETE, IS_OK, IS_OUTSIDE| Constructor and Description |
|---|
AddCommand(DataSet data,
OsmPrimitive osm)
Creates the command and specify the element to add in the context of the given data set.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkNodeStyles(OsmPrimitive osm) |
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.
|
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.
|
int |
hashCode() |
void |
undoCommand()
Undoes the command.
|
checkOutlyingOrIncompleteOperation, ensurePrimitivesAreInDataset, getAffectedDataSet, getOrigclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetChildrenprivate final OsmPrimitive osm
public AddCommand(DataSet data, OsmPrimitive osm)
data - The data set. Must not be nullosm - The primitive to addprotected static final void checkNodeStyles(OsmPrimitive osm)
public boolean executeCommand()
CommandThe layer should be invalidated after execution so that it can be re-painted.
executeCommand in class Commandpublic void undoCommand()
CommandundoCommand 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<OsmPrimitive> getParticipatingPrimitives()
CommandgetParticipatingPrimitives in interface PseudoCommandgetParticipatingPrimitives in class Command