Package org.openstreetmap.josm.command
Interface DeleteCommand.DeletionCallback
- Enclosing class:
- DeleteCommand
public static interface DeleteCommand.DeletionCallback
Called when a deletion operation must be checked and confirmed by user.
- Since:
- 12749
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckAndConfirmOutlyingDelete(Collection<? extends OsmPrimitive> primitives, Collection<? extends OsmPrimitive> ignore) Check whether user is about to delete data outside of the download area.booleanConfirm before removing a collection of primitives from their parent relations.default booleanconfirmDeletionFromRelation(Collection<RelationToChildReference> references, Collection<Pair<Relation, Boolean>> parentsToDelete) Confirm before removing a collection of primitives from their parent relations, with the probability of deleting the parents as well.booleanconfirmRelationDeletion(Collection<Relation> relations) Confirm before deleting a relation, as it is a common newbie error.
-
Method Details
-
checkAndConfirmOutlyingDelete
boolean checkAndConfirmOutlyingDelete(Collection<? extends OsmPrimitive> primitives, Collection<? extends OsmPrimitive> ignore) Check whether user is about to delete data outside of the download area. Request confirmation if he is.- Parameters:
primitives- the primitives to operate onignore-nullor a primitive to be ignored- Returns:
- true, if operating on outlying primitives is OK; false, otherwise
-
confirmRelationDeletion
Confirm before deleting a relation, as it is a common newbie error.- Parameters:
relations- relation to check for deletion- Returns:
trueif user confirms the deletion- Since:
- 12760
-
confirmDeletionFromRelation
Confirm before removing a collection of primitives from their parent relations.- Parameters:
references- the list of relation-to-child references- Returns:
trueif user confirms the deletion- Since:
- 12763
-
confirmDeletionFromRelation
default boolean confirmDeletionFromRelation(Collection<RelationToChildReference> references, Collection<Pair<Relation, Boolean>> parentsToDelete) Confirm before removing a collection of primitives from their parent relations, with the probability of deleting the parents as well.- Parameters:
references- the list of relation-to-child referencesparentsToDelete- the list of parents to delete (the boolean part will betrueif the user wants to delete the relation).- Returns:
trueif the user confirms the deletion- Since:
- 18395
-