source: josm/trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverColumnModel.java@ 6770

Last change on this file since 6770 was 6616, checked in by Don-vip, 10 years ago

fix #4073 - colour coding of conflicting tags/memberships in way combining dialog

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.conflict.tags;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import javax.swing.table.DefaultTableColumnModel;
7import javax.swing.table.TableColumn;
8
9public class TagConflictResolverColumnModel extends DefaultTableColumnModel{
10
11 protected void createColumns() {
12 TableColumn col = null;
13 MultiValueCellRenderer renderer = new MultiValueCellRenderer();
14 MultiValueCellEditor editor = new MultiValueCellEditor();
15
16 // column 0 - State
17 col = new TableColumn(0);
18 col.setHeaderValue("");
19 col.setResizable(true);
20 col.setWidth(20);
21 col.setPreferredWidth(20);
22 col.setMaxWidth(30);
23 col.setCellRenderer(renderer);
24 addColumn(col);
25
26 // column 1 - Key
27 col = new TableColumn(1);
28 col.setHeaderValue(tr("Key"));
29 col.setResizable(true);
30 col.setCellRenderer(renderer);
31 addColumn(col);
32
33 // column 2 - Value
34 col = new TableColumn(2);
35 col.setHeaderValue(tr("Value"));
36 col.setResizable(true);
37 col.setCellRenderer(renderer);
38 col.setCellEditor(editor);
39 addColumn(col);
40 }
41
42 /**
43 * Constructs a new {@code TagConflictResolverColumnModel}.
44 */
45 public TagConflictResolverColumnModel() {
46 createColumns();
47 }
48}
Note: See TracBrowser for help on using the repository browser.