source: josm/trunk/src/org/openstreetmap/josm/gui/history/VersionTableColumnModel.java@ 5340

Last change on this file since 5340 was 5340, checked in by Don-vip, 12 years ago

see #7505 - Hide redacted version in history browser when loading an .osm file containg primitives that have been redacted meanwhile

  • Property svn:eol-style set to native
File size: 2.1 KB
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.SwingConstants;
7import javax.swing.table.DefaultTableColumnModel;
8import javax.swing.table.TableColumn;
9
10/**
11 * The {@link TableColumnModel} for the table with the list of versions
12 *
13 */
14public class VersionTableColumnModel extends DefaultTableColumnModel {
15 protected void createColumns() {
16 TableColumn col = null;
17 VersionTable.RadioButtonRenderer bRenderer = new VersionTable.RadioButtonRenderer();
18
19 // column 0 - Version
20 col = new TableColumn(0);
21 /* translation note: 3 letter abbr. for "Version" */
22 col.setHeaderValue(tr("Ver"));
23 col.setCellRenderer(new VersionTable.AlignedRenderer(SwingConstants.CENTER));
24 col.setResizable(false);
25 addColumn(col);
26 // column 1 - Reference
27 col = new TableColumn(1);
28 col.setHeaderValue(tr("A"));
29 col.setCellRenderer(bRenderer);
30 col.setCellEditor(new VersionTable.RadioButtonEditor());
31 col.setResizable(false);
32 addColumn(col);
33 // column 2 - Current
34 col = new TableColumn(2);
35 col.setHeaderValue(tr("B"));
36 col.setCellRenderer(bRenderer);
37 col.setCellEditor(new VersionTable.RadioButtonEditor());
38 col.setResizable(false);
39 addColumn(col);
40 // column 3 - CT state
41 col = new TableColumn(3);
42 /* translation note: short for "Contributor Terms" */
43 col.setHeaderValue(tr("CT"));
44 col.setCellRenderer(new VersionTable.LabelRenderer());
45 col.setPreferredWidth(22);
46 col.setResizable(false);
47 addColumn(col);
48 // column 4 - Date
49 col = new TableColumn(4);
50 col.setHeaderValue(tr("Date"));
51 col.setResizable(false);
52 addColumn(col);
53 // column 5 - User
54 col = new TableColumn(5);
55 col.setHeaderValue(tr("User"));
56 col.setResizable(false);
57 addColumn(col);
58 }
59
60 public VersionTableColumnModel() {
61 createColumns();
62 }
63}
Note: See TracBrowser for help on using the repository browser.