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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
checkAndConfirmOutlyingDelete(java.util.Collection<? extends OsmPrimitive> primitives, java.util.Collection<? extends OsmPrimitive> ignore)
Check whether user is about to delete data outside of the download area.boolean
confirmDeletionFromRelation(java.util.Collection<RelationToChildReference> references)
Confirm before removing a collection of primitives from their parent relations.default boolean
confirmDeletionFromRelation(java.util.Collection<RelationToChildReference> references, java.util.Collection<Pair<Relation,java.lang.Boolean>> parentsToDelete)
Confirm before removing a collection of primitives from their parent relations, with the probability of deleting the parents as well.boolean
confirmRelationDeletion(java.util.Collection<Relation> relations)
Confirm before deleting a relation, as it is a common newbie error.
-
-
-
Method Detail
-
checkAndConfirmOutlyingDelete
boolean checkAndConfirmOutlyingDelete(java.util.Collection<? extends OsmPrimitive> primitives, java.util.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
-null
or a primitive to be ignored- Returns:
- true, if operating on outlying primitives is OK; false, otherwise
-
confirmRelationDeletion
boolean confirmRelationDeletion(java.util.Collection<Relation> relations)
Confirm before deleting a relation, as it is a common newbie error.- Parameters:
relations
- relation to check for deletion- Returns:
true
if user confirms the deletion- Since:
- 12760
-
confirmDeletionFromRelation
boolean confirmDeletionFromRelation(java.util.Collection<RelationToChildReference> references)
Confirm before removing a collection of primitives from their parent relations.- Parameters:
references
- the list of relation-to-child references- Returns:
true
if user confirms the deletion- Since:
- 12763
-
confirmDeletionFromRelation
default boolean confirmDeletionFromRelation(java.util.Collection<RelationToChildReference> references, java.util.Collection<Pair<Relation,java.lang.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 betrue
if the user wants to delete the relation).- Returns:
true
if the user confirms the deletion- Since:
- 18395
-
-