Changeset 34455 in osm


Ignore:
Timestamp:
2018-08-13T22:36:04+02:00 (6 years ago)
Author:
donvip
Message:

fix deprecation warnings

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  
    3535            return;
    3636        dlg = new MultiTagDialog();
    37         dlg.selectionChanged(getLayerManager().getEditDataSet().getSelected());
     37        dlg.doSelectionChanged(getLayerManager().getEditDataSet().getSelected());
    3838        dlg.showDialog();
    3939    }
     
    4848        setEnabled(getLayerManager().getEditLayer() != null);
    4949        if (dlg != null && dlg.isVisible()) {
    50             dlg.selectionChanged(selection);
     50            dlg.doSelectionChanged(selection);
    5151        }
    5252    }
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java

    r34454 r34455  
    4242import org.openstreetmap.josm.actions.AutoScaleAction;
    4343import org.openstreetmap.josm.actions.search.SearchAction;
    44 import org.openstreetmap.josm.data.SelectionChangedListener;
     44import org.openstreetmap.josm.data.osm.DataSelectionListener;
    4545import org.openstreetmap.josm.data.osm.OsmPrimitive;
    4646import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     
    6666 * Dialog for editing multiple object tags
    6767 */
    68 public class MultiTagDialog extends ExtendedDialog implements SelectionChangedListener {
     68public class MultiTagDialog extends ExtendedDialog implements DataSelectionListener {
    6969
    7070    private final MultiTaggerTableModel tableModel = new MultiTaggerTableModel();
     
    167167
    168168    @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);
    171175    }
    172176
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTaggerTableModel.java

    r34454 r34455  
    1515import org.openstreetmap.josm.command.Command;
    1616import org.openstreetmap.josm.command.SequenceCommand;
    17 import org.openstreetmap.josm.data.SelectionChangedListener;
    1817import org.openstreetmap.josm.data.UndoRedoHandler;
     18import org.openstreetmap.josm.data.osm.DataSelectionListener;
    1919import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2020import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     
    2626 * Model of the multi tag table.
    2727 */
    28 public class MultiTaggerTableModel extends AbstractTableModel implements SelectionChangedListener {
     28public class MultiTaggerTableModel extends AbstractTableModel implements DataSelectionListener {
    2929
    3030    ArrayList<OsmPrimitive> list = new ArrayList<>(50);
     
    5454        this.watchSelection = watchSelection;
    5555        if (watchSelection && MainApplication.getLayerManager().getEditLayer() != null)
    56             selectionChanged(MainApplication.getLayerManager().getEditDataSet().getSelected());
     56            doSelectionChanged(MainApplication.getLayerManager().getEditDataSet().getSelected());
    5757    }
    5858
     
    9595
    9696    @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) {
    98102        if (watchSelection)
    99103            updateData(newSelection);
Note: See TracChangeset for help on using the changeset viewer.