Ignore:
Timestamp:
2014-05-09T04:49:54+02:00 (10 years ago)
Author:
Don-vip
Message:

fixes for unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JumpToAction.java

    r7025 r7081  
    3232 */
    3333public class JumpToAction extends JosmAction {
    34    
     34
    3535    /**
    3636     * Constructs a new {@code JumpToAction}.
    3737     */
    3838    public JumpToAction() {
    39         super(tr("Jump To Position"), (Icon) null, tr("Opens a dialog that allows to jump to a specific location"), 
     39        super(tr("Jump To Position"), (Icon) null, tr("Opens a dialog that allows to jump to a specific location"),
    4040                Shortcut.registerShortcut("tools:jumpto", tr("Tool: {0}", tr("Jump To Position")),
    4141                        KeyEvent.VK_J, Shortcut.CTRL), true, "action/jumpto", true);
     
    4646    private final JosmTextField lon = new JosmTextField();
    4747    private final JosmTextField zm = new JosmTextField();
     48
     49    class OsmURLListener implements DocumentListener {
     50        @Override public void changedUpdate(DocumentEvent e) { parseURL(); }
     51        @Override public void insertUpdate(DocumentEvent e) { parseURL(); }
     52        @Override public void removeUpdate(DocumentEvent e) { parseURL(); }
     53    }
     54
     55    class OsmLonLatListener implements DocumentListener {
     56        @Override public void changedUpdate(DocumentEvent e) { updateUrl(false); }
     57        @Override public void insertUpdate(DocumentEvent e) { updateUrl(false); }
     58        @Override public void removeUpdate(DocumentEvent e) { updateUrl(false); }
     59    }
    4860
    4961    /**
     
    7385                              + "</html>"),
    7486                  BorderLayout.NORTH);
    75 
    76         class OsmURLListener implements DocumentListener {
    77             @Override public void changedUpdate(DocumentEvent e) { parseURL(); }
    78             @Override public void insertUpdate(DocumentEvent e) { parseURL(); }
    79             @Override public void removeUpdate(DocumentEvent e) { parseURL(); }
    80         }
    81 
    82         class OsmLonLatListener implements DocumentListener {
    83             @Override public void changedUpdate(DocumentEvent e) { updateUrl(false); }
    84             @Override public void insertUpdate(DocumentEvent e) { updateUrl(false); }
    85             @Override public void removeUpdate(DocumentEvent e) { updateUrl(false); }
    86         }
    8787
    8888        OsmLonLatListener x = new OsmLonLatListener();
     
    150150                    int eq = arg.indexOf('=');
    151151                    if (eq == -1 || !"zoom".equalsIgnoreCase(arg.substring(0, eq))) continue;
    152    
     152
    153153                    zoomLvl = Integer.parseInt(arg.substring(eq + 1));
    154154                    break;
Note: See TracChangeset for help on using the changeset viewer.