Changeset 14675 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2019-01-12T14:30:57+01:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/history
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java
r14483 r14675 55 55 @Override 56 56 protected JTable buildReferenceTable() { 57 final DiffTableModel tableModel = model.getNodeListTableModel(PointInTimeType.REFERENCE_POINT_IN_TIME); 57 return buildTable(PointInTimeType.REFERENCE_POINT_IN_TIME, "table.referencenodelisttable"); 58 } 59 60 @Override 61 protected JTable buildCurrentTable() { 62 return buildTable(PointInTimeType.CURRENT_POINT_IN_TIME, "table.currentnodelisttable"); 63 } 64 65 private JTable buildTable(PointInTimeType pointInTimeType, String name) { 66 final DiffTableModel tableModel = model.getNodeListTableModel(pointInTimeType); 58 67 final NodeListTableColumnModel columnModel = new NodeListTableColumnModel(); 59 68 final JTable table = new JTable(tableModel, columnModel); 60 69 tableModel.addTableModelListener(new ReversedChangeListener(table, columnModel)); 61 table.setName("table.referencenodelisttable"); 62 table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 63 selectionSynchronizer.participateInSynchronizedSelection(table.getSelectionModel()); 64 table.addMouseListener(new InternalPopupMenuLauncher()); 65 table.addMouseListener(new DoubleClickAdapter(table)); 66 return table; 67 } 68 69 @Override 70 protected JTable buildCurrentTable() { 71 final DiffTableModel tableModel = model.getNodeListTableModel(PointInTimeType.CURRENT_POINT_IN_TIME); 72 final NodeListTableColumnModel columnModel = new NodeListTableColumnModel(); 73 final JTable table = new JTable(tableModel, columnModel); 74 tableModel.addTableModelListener(new ReversedChangeListener(table, columnModel)); 75 table.setName("table.currentnodelisttable"); 70 table.setName(name); 76 71 table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 77 72 selectionSynchronizer.participateInSynchronizedSelection(table.getSelectionModel()); -
trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListViewer.java
r14463 r14675 37 37 @Override 38 38 protected JTable buildReferenceTable() { 39 JTable table = new JTable( 40 model.getRelationMemberTableModel(PointInTimeType.REFERENCE_POINT_IN_TIME), 41 new RelationMemberTableColumnModel() 42 ); 43 table.setName("table.referencememberlisttable"); 44 table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 45 selectionSynchronizer.participateInSynchronizedSelection(table.getSelectionModel()); 46 table.getModel().addTableModelListener(new MemberModelChanged(table)); 47 return table; 39 return buildTable(PointInTimeType.REFERENCE_POINT_IN_TIME, "table.referencememberlisttable"); 48 40 } 49 41 50 42 @Override 51 43 protected JTable buildCurrentTable() { 44 return buildTable(PointInTimeType.CURRENT_POINT_IN_TIME, "table.currentmemberlisttable"); 45 } 46 47 private JTable buildTable(PointInTimeType pointInTimeType, String name) { 52 48 JTable table = new JTable( 53 model.getRelationMemberTableModel(PointInTimeType.CURRENT_POINT_IN_TIME), 54 new RelationMemberTableColumnModel() 55 ); 56 table.setName("table.currentmemberlisttable"); 49 model.getRelationMemberTableModel(pointInTimeType), 50 new RelationMemberTableColumnModel()); 51 table.setName(name); 57 52 table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 58 53 selectionSynchronizer.participateInSynchronizedSelection(table.getSelectionModel());
Note:
See TracChangeset
for help on using the changeset viewer.