public class ChangeRelationMemberRoleCommand extends Command
Command.OldNodeState
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
newRole |
private java.lang.Boolean |
oldModified |
private java.lang.String |
oldRole |
private int |
position |
private Relation |
relation |
Constructor and Description |
---|
ChangeRelationMemberRoleCommand(Relation relation,
int position,
java.lang.String newRole)
Constructs a new
ChangeRelationMemberRoleCommand . |
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.
|
javax.swing.Icon |
getDescriptionIcon()
Provides a descriptive icon of this command.
|
java.lang.String |
getDescriptionText()
Provides a description text representing this command.
|
int |
hashCode() |
void |
undoCommand()
Undoes the command.
|
checkAndConfirmOutlyingOperation, getLayer, getOrig, getParticipatingPrimitives, invalidBecauselayerRemoved
getChildren
private int position
private final java.lang.String newRole
private java.lang.String oldRole
private java.lang.Boolean oldModified
public ChangeRelationMemberRoleCommand(Relation relation, int position, java.lang.String newRole)
ChangeRelationMemberRoleCommand
.relation
- The relation to be changedposition
- Member positionnewRole
- New rolepublic boolean executeCommand()
Command
executeCommand
in class Command
public 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 Command
modified
- The modified primitivesdeleted
- The deleted primitivesadded
- The added primitivespublic java.lang.String getDescriptionText()
PseudoCommand
getDescriptionText
in class PseudoCommand
public javax.swing.Icon getDescriptionIcon()
PseudoCommand
getDescriptionIcon
in class PseudoCommand