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
|
Rev | Line | |
---|
[2512] | 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 | /**
|
---|
[5832] | 10 | * The {@link javax.swing.table.TableColumnModel} for the table with the list of tags
|
---|
[7822] | 11 | * @since 1709
|
---|
[2512] | 12 | */
|
---|
[7822] | 13 | public class TagTableColumnModel extends DefaultTableColumnModel {
|
---|
[10637] | 14 | protected static final int COLUMN_KEY = 0;
|
---|
| 15 | protected static final int COLUMN_VALUE = 1;
|
---|
[10308] | 16 |
|
---|
| 17 | /**
|
---|
| 18 | * Constructs a new {@code TagTableColumnModel}.
|
---|
| 19 | */
|
---|
| 20 | public TagTableColumnModel() {
|
---|
| 21 | createColumns();
|
---|
| 22 | }
|
---|
| 23 |
|
---|
[2512] | 24 | protected void createColumns() {
|
---|
| 25 | TagTableCellRenderer renderer = new TagTableCellRenderer();
|
---|
| 26 |
|
---|
[7822] | 27 | // column 0 - Key
|
---|
[10308] | 28 | TableColumn col = new TableColumn(0);
|
---|
[7822] | 29 | col.setHeaderValue(tr("Key"));
|
---|
[2512] | 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.