Ignore:
Timestamp:
2008-08-24T16:37:05+02:00 (16 years ago)
Author:
stoecker
Message:

I18N, remove deprecated interface

Location:
applications/editors/josm/plugins/slippymap
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/slippymap/build.xml

    r7821 r10111  
    4949  <target name="compile" depends="init">
    5050    <echo message="creating ${plugin.jar}"/>
    51     <javac srcdir="src" classpath="../../core/dist/josm-custom.jar" destdir="build" />
     51    <javac srcdir="src" classpath="../../core/dist/josm-custom.jar" destdir="build">
     52      <compilerarg value="-Xlint:deprecation"/>
     53    </javac>
    5254  </target>
    5355 
  • applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapLayer.java

    r5689 r10111  
    11package org.openstreetmap.josm.plugins.slippymap;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.Color;
     
    5456    public SlippyMapLayer()
    5557    {
    56         super("Slippy Map");
     58        super(tr("Slippy Map"));
    5759
    5860        clearTileStorage();
    5961
    6062        tileOptionMenu = new JPopupMenu();
    61         tileOptionMenu.add(new JMenuItem(new AbstractAction("Load Tile")
     63        tileOptionMenu.add(new JMenuItem(new AbstractAction(tr("Load Tile"))
    6264        {
    6365            public void actionPerformed(ActionEvent ae)
     
    7274        }));
    7375
    74         tileOptionMenu.add(new JMenuItem(new AbstractAction("Show Tile Status")
     76        tileOptionMenu.add(new JMenuItem(new AbstractAction(tr("Show Tile Status"))
    7577        {
    7678            public void actionPerformed(ActionEvent ae)
     
    8587        }));
    8688
    87         tileOptionMenu.add(new JMenuItem(new AbstractAction("Request Update")
     89        tileOptionMenu.add(new JMenuItem(new AbstractAction(tr("Request Update"))
    8890        {
    8991            public void actionPerformed(ActionEvent ae)
     
    98100        }));
    99101
    100         tileOptionMenu.add(new JMenuItem(new AbstractAction("Load All Tiles")
     102        tileOptionMenu.add(new JMenuItem(new AbstractAction(tr("Load All Tiles"))
    101103        {
    102104            public void actionPerformed(ActionEvent ae)
     
    125127                });
    126128
    127                 Main.map.mapView
    128                         .addLayerChangeListener(new MapView.LayerChangeListener()
     129                listeners.add(new LayerChangeListener()
    129130                        {
    130131                            public void activeLayerChange(Layer oldLayer,
     
    324325                if (tile.getImage() == null)
    325326                {
    326                     g.drawString("image not loaded", p.x + 2, texty);
     327                    g.drawString(tr("image not loaded"), p.x + 2, texty);
    327328                    texty += 1 + fontHeight;
    328329                }
     
    474475        if (key.startsWith(SlippyMapPreferences.PREFERENCE_PREFIX))
    475476        {
    476             System.err.println(this + ".preferenceChanged('" + key + "', '"
    477                     + newValue + "') called");
     477//            System.err.println(this + ".preferenceChanged('" + key + "', '"
     478//                    + newValue + "') called");
    478479
    479480            clearTileStorage();
  • applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapPreferenceSetting.java

    r5691 r10111  
    4040        for (int i = 0; i < allMapUrls.length; i++)
    4141        {
    42             System.err.println("Comparing '" + source + "' to '"
    43                     + allMapUrls[i]);
     42//            System.err.println("Comparing '" + source + "' to '"
     43//                   + allMapUrls[i]);
    4444
    4545            if (source.equals(allMapUrls[i]))
  • applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapTile.java

    r5689 r10111  
    11package org.openstreetmap.josm.plugins.slippymap;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.Image;
     
    6769            BufferedReader in = new BufferedReader(new InputStreamReader(devc
    6870                    .getInputStream()));
    69             metadata = in.readLine();
     71            metadata = tr(in.readLine());
    7072        }
    7173        catch (Exception ex)
    7274        {
    73             metadata = "error loading metadata";
     75            metadata = tr("error loading metadata");
    7476        }
    7577
     
    8587            BufferedReader in = new BufferedReader(new InputStreamReader(devc
    8688                    .getInputStream()));
    87             metadata = "requested: " + in.readLine();
     89            metadata = tr("requested: {0}", tr(in.readLine()));
    8890        }
    8991        catch (Exception ex)
    9092        {
    91             metadata = "error requesting update";
     93            metadata = tr("error requesting update");
    9294        }
    9395    }
Note: See TracChangeset for help on using the changeset viewer.