001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.gui.conflict.pair.nodes;
003
004import javax.swing.ListSelectionModel;
005
006import org.openstreetmap.josm.actions.ZoomToAction;
007import org.openstreetmap.josm.command.conflict.WayNodesConflictResolverCommand;
008import org.openstreetmap.josm.data.osm.Node;
009import org.openstreetmap.josm.gui.conflict.pair.AbstractListMergeModel;
010import org.openstreetmap.josm.gui.conflict.pair.PairTable;
011import org.openstreetmap.josm.gui.widgets.OsmPrimitivesTableModel;
012
013/**
014 * Node list table.
015 * @since 5297
016 */
017public class NodeListTable extends PairTable {
018
019    /**
020     * Constructs a new {@code NodeListTable}.
021     * @param name table name
022     * @param model node merge model
023     * @param dm table model
024     * @param sm selection model
025     */
026    public NodeListTable(String name, AbstractListMergeModel<Node, WayNodesConflictResolverCommand> model,
027            OsmPrimitivesTableModel dm, ListSelectionModel sm) {
028        super(name, model, dm, new NodeListColumnModel(new NodeListTableCellRenderer()), sm);
029    }
030
031    @Override
032    protected ZoomToAction buildZoomToAction() {
033        return new ZoomToAction(this);
034    }
035}