org.openstreetmap.josm.gui.conflict.pair.nodes
Class NodeListMergeModel
java.lang.Object
java.util.Observable
org.openstreetmap.josm.gui.conflict.pair.ListMergeModel<Node>
org.openstreetmap.josm.gui.conflict.pair.nodes.NodeListMergeModel
public class NodeListMergeModel
- extends ListMergeModel<Node>
Methods inherited from class org.openstreetmap.josm.gui.conflict.pair.ListMergeModel |
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 java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeListMergeModel
public NodeListMergeModel()
populate
public void populate(Way my,
Way their,
java.util.Map<PrimitiveId,PrimitiveId> mergedMap)
- Populates the model with the nodes in the two
Way
s my
and
their
.
- 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
- thrown, if my is null
java.lang.IllegalArgumentException
- thrown, if their is null
buildResolveCommand
public WayNodesConflictResolverCommand buildResolveCommand(Conflict<? extends OsmPrimitive> conflict)
- Builds the command to resolve conflicts in the node list of a way
- Parameters:
my
- my way. Must not be null.their
- their way. Must not be null
- Returns:
- the command
- Throws:
java.lang.IllegalStateException
- thrown, if the merge is not yet frozen
isEqualEntry
public boolean isEqualEntry(Node e1,
Node e2)
- Description copied from class:
ListMergeModel
- checks whether two entries are equal. This is not necessarily the same as
e1.equals(e2).
- Specified by:
isEqualEntry
in class ListMergeModel<Node>
- 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:
ListMergeModel
- Handles method dispatches from
ListMergeModel.EntriesTableModel.setValueAt(Object, int, int)
.
- Specified by:
setValueAt
in class ListMergeModel<Node>
- Parameters:
model
- the table modelvalue
- the value to be setrow
- the row indexcol
- the column index- See Also:
ListMergeModel.EntriesTableModel.setValueAt(Object, int, int)
cloneEntryForMergedList
protected Node cloneEntryForMergedList(Node entry)
- Description copied from class:
ListMergeModel
- Creates a clone of an entry of type T suitable to be included in the
list of merged entries
- Specified by:
cloneEntryForMergedList
in class ListMergeModel<Node>
- Parameters:
entry
- the entry
- Returns:
- the cloned entry
JOSM