001 // License: GPL. For details, see LICENSE file.
002 package org.openstreetmap.josm.gui.history;
003
004 import static org.openstreetmap.josm.tools.I18n.tr;
005
006 import javax.swing.table.DefaultTableColumnModel;
007 import javax.swing.table.TableColumn;
008
009 /**
010 * The {@link TableColumnModel} for the table with the list of tags
011 *
012 */
013 public class TagTableColumnModel extends DefaultTableColumnModel{
014 protected void createColumns() {
015 TableColumn col = null;
016
017 TagTableCellRenderer renderer = new TagTableCellRenderer();
018
019 // column 0 - Name
020 col = new TableColumn(0);
021 col.setHeaderValue(tr("Name"));
022 col.setCellRenderer(renderer);
023 addColumn(col);
024
025 // column 1 - Value
026 col = new TableColumn(1);
027 col.setHeaderValue(tr("Value"));
028 col.setCellRenderer(renderer);
029 addColumn(col);
030
031 }
032
033 public TagTableColumnModel() {
034 createColumns();
035 }
036 }