Changeset 34455 in osm for applications/editors/josm
- Timestamp:
- 2018-08-13T22:36:04+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagAction.java
r34454 r34455 35 35 return; 36 36 dlg = new MultiTagDialog(); 37 dlg. selectionChanged(getLayerManager().getEditDataSet().getSelected());37 dlg.doSelectionChanged(getLayerManager().getEditDataSet().getSelected()); 38 38 dlg.showDialog(); 39 39 } … … 48 48 setEnabled(getLayerManager().getEditLayer() != null); 49 49 if (dlg != null && dlg.isVisible()) { 50 dlg. selectionChanged(selection);50 dlg.doSelectionChanged(selection); 51 51 } 52 52 } -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java
r34454 r34455 42 42 import org.openstreetmap.josm.actions.AutoScaleAction; 43 43 import org.openstreetmap.josm.actions.search.SearchAction; 44 import org.openstreetmap.josm.data. SelectionChangedListener;44 import org.openstreetmap.josm.data.osm.DataSelectionListener; 45 45 import org.openstreetmap.josm.data.osm.OsmPrimitive; 46 46 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; … … 66 66 * Dialog for editing multiple object tags 67 67 */ 68 public class MultiTagDialog extends ExtendedDialog implements SelectionChangedListener {68 public class MultiTagDialog extends ExtendedDialog implements DataSelectionListener { 69 69 70 70 private final MultiTaggerTableModel tableModel = new MultiTaggerTableModel(); … … 167 167 168 168 @Override 169 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) { 170 tableModel.selectionChanged(newSelection); 169 public void selectionChanged(SelectionChangeEvent event) { 170 tableModel.selectionChanged(event); 171 } 172 173 void doSelectionChanged(Collection<? extends OsmPrimitive> newSelection) { 174 tableModel.doSelectionChanged(newSelection); 171 175 } 172 176 -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTaggerTableModel.java
r34454 r34455 15 15 import org.openstreetmap.josm.command.Command; 16 16 import org.openstreetmap.josm.command.SequenceCommand; 17 import org.openstreetmap.josm.data.SelectionChangedListener;18 17 import org.openstreetmap.josm.data.UndoRedoHandler; 18 import org.openstreetmap.josm.data.osm.DataSelectionListener; 19 19 import org.openstreetmap.josm.data.osm.OsmPrimitive; 20 20 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; … … 26 26 * Model of the multi tag table. 27 27 */ 28 public class MultiTaggerTableModel extends AbstractTableModel implements SelectionChangedListener {28 public class MultiTaggerTableModel extends AbstractTableModel implements DataSelectionListener { 29 29 30 30 ArrayList<OsmPrimitive> list = new ArrayList<>(50); … … 54 54 this.watchSelection = watchSelection; 55 55 if (watchSelection && MainApplication.getLayerManager().getEditLayer() != null) 56 selectionChanged(MainApplication.getLayerManager().getEditDataSet().getSelected());56 doSelectionChanged(MainApplication.getLayerManager().getEditDataSet().getSelected()); 57 57 } 58 58 … … 95 95 96 96 @Override 97 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) { 97 public void selectionChanged(SelectionChangeEvent event) { 98 doSelectionChanged(event.getSelection()); 99 } 100 101 public void doSelectionChanged(Collection<? extends OsmPrimitive> newSelection) { 98 102 if (watchSelection) 99 103 updateData(newSelection);
Note:
See TracChangeset
for help on using the changeset viewer.