public class SelectCommand extends Command
Command.OldNodeState
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<OsmPrimitive> |
newSelection
the primitives to select when executing the command
|
private java.util.Collection<OsmPrimitive> |
oldSelection
the selection before applying the new selection
|
IS_INCOMPLETE, IS_OK, IS_OUTSIDE
Constructor and Description |
---|
SelectCommand(DataSet dataset,
java.util.Collection<OsmPrimitive> newSelection)
Constructs a new select command.
|
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.lang.String |
getDescriptionText()
Provides a description text representing this command.
|
java.util.Collection<? extends OsmPrimitive> |
getParticipatingPrimitives()
Return the primitives that take part in this command.
|
int |
hashCode() |
void |
undoCommand()
Undoes the command.
|
checkOutlyingOrIncompleteOperation, ensurePrimitivesAreInDataset, getAffectedDataSet, getOrig
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getChildren, getDescriptionIcon
private final java.util.Collection<OsmPrimitive> newSelection
private java.util.Collection<OsmPrimitive> oldSelection
public SelectCommand(DataSet dataset, java.util.Collection<OsmPrimitive> newSelection)
dataset
- The dataset the selection belongs tonewSelection
- the primitives to select when executing the command.public void fillModifiedData(java.util.Collection<OsmPrimitive> modified, java.util.Collection<OsmPrimitive> deleted, java.util.Collection<OsmPrimitive> added)
Command
fillModifiedData
in class Command
modified
- The modified primitivesdeleted
- The deleted primitivesadded
- The added primitivespublic void undoCommand()
Command
undoCommand
in class Command
public boolean executeCommand()
Command
The layer should be invalidated after execution so that it can be re-painted.
executeCommand
in class Command
public java.util.Collection<? extends OsmPrimitive> getParticipatingPrimitives()
Command
getParticipatingPrimitives
in interface PseudoCommand
getParticipatingPrimitives
in class Command
public java.lang.String getDescriptionText()
PseudoCommand