Changeset 6214 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2013-09-02T03:10:02+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java
r6087 r6214 18 18 import org.openstreetmap.josm.data.osm.User; 19 19 20 /** 21 * The cell renderer for the changeset table 22 * @since 2689 23 */ 20 24 public class ChangesetCacheTableCellRenderer extends JLabel implements TableCellRenderer{ 21 25 26 /** 27 * Constructs a new {@code ChangesetCacheTableCellRenderer}. 28 */ 22 29 public ChangesetCacheTableCellRenderer() { 23 30 setOpaque(true); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableColumnModel.java
r4043 r6214 9 9 /** 10 10 * The column model for the changeset table 11 * 11 * @since 2689 12 12 */ 13 13 public class ChangesetCacheTableColumnModel extends DefaultTableColumnModel { 14 14 15 protected void createColumns() { 16 TableColumn col = null; 17 ChangesetCacheTableCellRenderer renderer = new ChangesetCacheTableCellRenderer(); 18 19 // column 0 - Id 20 col = new TableColumn(0); 21 col.setHeaderValue(tr("ID")); 15 private final ChangesetCacheTableCellRenderer renderer = new ChangesetCacheTableCellRenderer(); 16 17 protected void createColumn(int modelIndex, String headerValue, int preferredWidth, int width) { 18 TableColumn col = new TableColumn(modelIndex); 19 col.setHeaderValue(headerValue); 22 20 col.setResizable(true); 23 col.setWidth(20); 24 col.setPreferredWidth(20); 25 col.setCellRenderer(renderer); 26 addColumn(col); 27 28 // column 1 - Upload comment 29 col = new TableColumn(1); 30 col.setHeaderValue(tr("Comment")); 31 col.setResizable(true); 32 col.setPreferredWidth(200); 33 col.setCellRenderer(renderer); 34 addColumn(col); 35 36 // column 2 - Open 37 col = new TableColumn(2); 38 col.setHeaderValue(tr("Open")); 39 col.setResizable(true); 40 col.setPreferredWidth(50); 41 col.setCellRenderer(renderer); 42 addColumn(col); 43 44 // column 3 - User 45 col = new TableColumn(3); 46 col.setHeaderValue(tr("User")); 47 col.setResizable(true); 48 col.setPreferredWidth(50); 49 col.setCellRenderer(renderer); 50 addColumn(col); 51 52 // column 4 - Created at 53 col = new TableColumn(4); 54 col.setHeaderValue(tr("Created at")); 55 col.setResizable(true); 56 col.setPreferredWidth(100); 57 col.setCellRenderer(renderer); 58 addColumn(col); 59 60 // column 5 - Closed at 61 col = new TableColumn(4); 62 col.setHeaderValue(tr("Closed at")); 63 col.setResizable(true); 64 col.setPreferredWidth(100); 21 if (width > -1) { 22 col.setWidth(width); 23 } 24 col.setPreferredWidth(preferredWidth); 65 25 col.setCellRenderer(renderer); 66 26 addColumn(col); 67 27 } 28 29 protected void createColumns() { 68 30 31 // column 0 - Id 32 createColumn(0, tr("ID"), 20, 20); 33 34 // column 1 - Upload comment 35 createColumn(1, tr("Comment"), 200, -1); 36 37 // column 2 - Open 38 createColumn(2, tr("Open"), 50, -1); 39 40 // column 3 - User 41 createColumn(3, tr("User"), 50, -1); 42 43 // column 4 - Created at 44 createColumn(4, tr("Created at"), 100, -1); 45 46 // column 5 - Closed at 47 createColumn(5, tr("Closed at"), 100, -1); 48 } 49 50 /** 51 * Creates a new {@code ChangesetCacheTableColumnModel}. 52 */ 69 53 public ChangesetCacheTableColumnModel() { 70 54 createColumns();
Note:
See TracChangeset
for help on using the changeset viewer.