Class NodeListMergeModel
- java.lang.Object
-
- org.openstreetmap.josm.gui.util.ChangeNotifier
-
- org.openstreetmap.josm.gui.conflict.pair.AbstractListMergeModel<Node,WayNodesConflictResolverCommand>
-
- org.openstreetmap.josm.gui.conflict.pair.nodes.NodeListMergeModel
-
public class NodeListMergeModel extends AbstractListMergeModel<Node,WayNodesConflictResolverCommand>
The model for merging two lists of way nodes- Since:
- 1622
-
-
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 Constructor Description NodeListMergeModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WayNodesConflictResolverCommandbuildResolveCommand(Conflict<? extends OsmPrimitive> conflict)Builds the command to resolve conflicts in the list.protected NodecloneEntryForMergedList(Node entry)Creates a clone of an entry of type T suitable to be included in the list of merged entriesbooleanisEqualEntry(Node e1, Node e2)checks whether two entries are equal.voidpopulate(Way my, Way their, java.util.Map<PrimitiveId,PrimitiveId> mergedMap)protected voidsetValueAt(javax.swing.table.DefaultTableModel model, java.lang.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, buildMergedEntriesTableModel, 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, getMyPrimitive, getMyPrimitiveById, getMySelectionModel, getMyTableModel, getTheirEntries, getTheirEntriesSize, getTheirSelectionModel, getTheirTableModel, initPopulate, isFrozen, moveDownMerged, moveUpMerged, myAndTheirEntriesEqual, removeMerged, removePropertyChangeListener, setFrozen
-
Methods inherited from class org.openstreetmap.josm.gui.util.ChangeNotifier
addChangeListener, fireStateChanged, removeChangeListener
-
-
-
-
Constructor Detail
-
NodeListMergeModel
public NodeListMergeModel()
-
-
Method Detail
-
populate
public void populate(Way my, Way their, java.util.Map<PrimitiveId,PrimitiveId> mergedMap)
- Parameters:
my- my way (i.e. the way in the local dataset)their- their way (i.e. the way in the server dataset)mergedMap- The map of merged primitives if the conflict results from merging two layers- Throws:
java.lang.IllegalArgumentException- if my is nulljava.lang.IllegalArgumentException- if their is null
-
buildResolveCommand
public WayNodesConflictResolverCommand buildResolveCommand(Conflict<? extends OsmPrimitive> conflict)
Description copied from class:AbstractListMergeModelBuilds the command to resolve conflicts in the list.- Specified by:
buildResolveCommandin classAbstractListMergeModel<Node,WayNodesConflictResolverCommand>- Parameters:
conflict- the conflict data set- Returns:
- the command
-
isEqualEntry
public boolean isEqualEntry(Node e1, Node e2)
Description copied from class:AbstractListMergeModelchecks whether two entries are equal. This is not necessarily the same as e1.equals(e2).- Specified by:
isEqualEntryin classAbstractListMergeModel<Node,WayNodesConflictResolverCommand>- Parameters:
e1- the first entrye2- the second entry- Returns:
- true, if the entries are equal, false otherwise.
-
setValueAt
protected void setValueAt(javax.swing.table.DefaultTableModel model, java.lang.Object value, int row, int col)
Description copied from class:AbstractListMergeModelHandles method dispatches fromTableModel.setValueAt(Object, int, int).- Specified by:
setValueAtin classAbstractListMergeModel<Node,WayNodesConflictResolverCommand>- Parameters:
model- the table modelvalue- the value to be setrow- the row indexcol- the column index- See Also:
TableModel.setValueAt(Object, int, int)
-
cloneEntryForMergedList
protected Node cloneEntryForMergedList(Node entry)
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<Node,WayNodesConflictResolverCommand>- Parameters:
entry- the entry- Returns:
- the cloned entry
-
-