source: josm/trunk/src/org/openstreetmap/josm/gui/history/TagTableColumnModel.java@ 10345

Last change on this file since 10345 was 10308, checked in by Don-vip, 8 years ago

sonar - squid:S1854 - Dead stores should be removed

  • Property svn:eol-style set to native
File size: 1003 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.history;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import javax.swing.table.DefaultTableColumnModel;
7import javax.swing.table.TableColumn;
8
9/**
10 * The {@link javax.swing.table.TableColumnModel} for the table with the list of tags
11 * @since 1709
12 */
13public class TagTableColumnModel extends DefaultTableColumnModel {
14
15 /**
16 * Constructs a new {@code TagTableColumnModel}.
17 */
18 public TagTableColumnModel() {
19 createColumns();
20 }
21
22 protected void createColumns() {
23 TagTableCellRenderer renderer = new TagTableCellRenderer();
24
25 // column 0 - Key
26 TableColumn col = new TableColumn(0);
27 col.setHeaderValue(tr("Key"));
28 col.setCellRenderer(renderer);
29 addColumn(col);
30
31 // column 1 - Value
32 col = new TableColumn(1);
33 col.setHeaderValue(tr("Value"));
34 col.setCellRenderer(renderer);
35 addColumn(col);
36 }
37}
Note: See TracBrowser for help on using the repository browser.