Class RelationMemberListMergeModel
java.lang.Object
org.openstreetmap.josm.gui.util.ChangeNotifier
org.openstreetmap.josm.gui.conflict.pair.AbstractListMergeModel<RelationMember,RelationMemberConflictResolverCommand>
org.openstreetmap.josm.gui.conflict.pair.relation.RelationMemberListMergeModel
public class RelationMemberListMergeModel
extends AbstractListMergeModel<RelationMember,RelationMemberConflictResolverCommand>
The model for merging two lists of relation members
- Since:
- 1631
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.conflict.pair.AbstractListMergeModel
AbstractListMergeModel.ComparePairListModel, AbstractListMergeModel.EntriesSelectionModel, AbstractListMergeModel.EntriesTableModel -
Field Summary
Fields inherited from class org.openstreetmap.josm.gui.conflict.pair.AbstractListMergeModel
entries, FROZEN_PROP, mergedEntriesSelectionModel, mergedEntriesTableModel, myEntriesSelectionModel, myEntriesTableModel, theirEntriesSelectionModel, theirEntriesTableModel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildResolveCommand(Conflict<? extends OsmPrimitive> conflict) Builds the command to resolve conflicts in the list.protected RelationMemberCreates a clone of an entry of type T suitable to be included in the list of merged entriesgetMyPrimitive(RelationMember entry) Replies primitive from my dataset referenced by entrybooleanisEqualEntry(RelationMember e1, RelationMember e2) checks whether two entries are equal.voidpopulate(Relation my, Relation their, Map<PrimitiveId, PrimitiveId> mergedMap) populates the model with the relation members in relation my and theirprotected voidsetValueAt(DefaultTableModel model, Object value, int row, int col) Handles method dispatches fromTableModel.setValueAt(Object, int, int).Methods inherited from class org.openstreetmap.josm.gui.conflict.pair.AbstractListMergeModel
addPropertyChangeListener, alertCopyFailedForDeletedPrimitives, buildMyEntriesTableModel, buildTheirEntriesTableModel, clearMerged, copyAfterCurrent, copyAll, copyBeforeCurrent, copyMyAfterCurrent, copyMyBeforeCurrent, copyMyToEnd, copyMyToTop, copyTheirAfterCurrent, copyTheirBeforeCurrent, copyTheirToEnd, copyTheirToTop, copyToEnd, copyToTop, fireFrozenChanged, fireModelDataChanged, getComparePairListModel, getMergedEntries, getMergedEntriesSize, getMergedSelectionModel, getMergedTableModel, getMyEntries, getMyEntriesSize, getMyPrimitiveById, getMySelectionModel, getMyTableModel, getTheirEntries, getTheirEntriesSize, getTheirSelectionModel, getTheirTableModel, initPopulate, isFrozen, moveDownMerged, moveUpMerged, myAndTheirEntriesEqual, removeMerged, removePropertyChangeListener, setFrozenMethods inherited from class org.openstreetmap.josm.gui.util.ChangeNotifier
addChangeListener, fireStateChanged, removeChangeListener
-
Constructor Details
-
RelationMemberListMergeModel
public RelationMemberListMergeModel()
-
-
Method Details
-
isEqualEntry
Description copied from class:AbstractListMergeModelchecks whether two entries are equal. This is not necessarily the same as e1.equals(e2).- Specified by:
isEqualEntryin classAbstractListMergeModel<RelationMember,RelationMemberConflictResolverCommand> - Parameters:
e1- the first entrye2- the second entry- Returns:
- true, if the entries are equal, false otherwise.
-
buildMergedEntriesTableModel
-
setValueAt
Description copied from class:AbstractListMergeModelHandles method dispatches fromTableModel.setValueAt(Object, int, int).- Specified by:
setValueAtin classAbstractListMergeModel<RelationMember,RelationMemberConflictResolverCommand> - Parameters:
model- the table modelvalue- the value to be setrow- the row indexcol- the column index- See Also:
-
populate
populates the model with the relation members in relation my and their- Parameters:
my- my relation. Must not be null.their- their relation. Must not be null.mergedMap- The map of merged primitives if the conflict results from merging two layers- Throws:
IllegalArgumentException- if my is nullIllegalArgumentException- if their is null
-
cloneEntryForMergedList
Description copied from class:AbstractListMergeModelCreates a clone of an entry of type T suitable to be included in the list of merged entries- Specified by:
cloneEntryForMergedListin classAbstractListMergeModel<RelationMember,RelationMemberConflictResolverCommand> - Parameters:
entry- the entry- Returns:
- the cloned entry
-
getMyPrimitive
Description copied from class:AbstractListMergeModelReplies primitive from my dataset referenced by entry- Overrides:
getMyPrimitivein classAbstractListMergeModel<RelationMember,RelationMemberConflictResolverCommand> - Parameters:
entry- entry- Returns:
- Primitive from my dataset referenced by entry
-
buildResolveCommand
public RelationMemberConflictResolverCommand buildResolveCommand(Conflict<? extends OsmPrimitive> conflict) Description copied from class:AbstractListMergeModelBuilds the command to resolve conflicts in the list.- Specified by:
buildResolveCommandin classAbstractListMergeModel<RelationMember,RelationMemberConflictResolverCommand> - Parameters:
conflict- the conflict data set- Returns:
- the command
-