Last change
on this file since 11553 was 10637, checked in by Don-vip, 8 years ago |
fix #13050 - cannot copy from the object history view (patch by michael2402, modified) - gsoc-core
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.history;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import javax.swing.table.DefaultTableColumnModel;
|
---|
7 | import 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 | */
|
---|
13 | public class TagTableColumnModel extends DefaultTableColumnModel {
|
---|
14 | protected static final int COLUMN_KEY = 0;
|
---|
15 | protected static final int COLUMN_VALUE = 1;
|
---|
16 |
|
---|
17 | /**
|
---|
18 | * Constructs a new {@code TagTableColumnModel}.
|
---|
19 | */
|
---|
20 | public TagTableColumnModel() {
|
---|
21 | createColumns();
|
---|
22 | }
|
---|
23 |
|
---|
24 | protected void createColumns() {
|
---|
25 | TagTableCellRenderer renderer = new TagTableCellRenderer();
|
---|
26 |
|
---|
27 | // column 0 - Key
|
---|
28 | TableColumn col = new TableColumn(0);
|
---|
29 | col.setHeaderValue(tr("Key"));
|
---|
30 | col.setCellRenderer(renderer);
|
---|
31 | addColumn(col);
|
---|
32 |
|
---|
33 | // column 1 - Value
|
---|
34 | col = new TableColumn(1);
|
---|
35 | col.setHeaderValue(tr("Value"));
|
---|
36 | col.setCellRenderer(renderer);
|
---|
37 | addColumn(col);
|
---|
38 | }
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.