Ticket #5235: bboxclear.diff

File bboxclear.diff, 1.4 KB (added by Upliner, 15 years ago)
  • src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java

     
    2222
    2323import javax.swing.AbstractAction;
    2424import javax.swing.BorderFactory;
     25import javax.swing.JButton;
    2526import javax.swing.JLabel;
    2627import javax.swing.JPanel;
    2728import javax.swing.JPopupMenu;
     
    110111        dlg.add(new JLabel(tr("max lon")), GBC.std().insets(10,0,5,0));
    111112        dlg.add(latlon[3], GBC.eol());
    112113
    113         dlg.add(new JLabel(tr("URL from www.openstreetmap.org (you can paste an URL here to download the area)")), GBC.eol().insets(10,20,5,0));
     114        final JButton btnClear = new JButton(tr("Clear textarea"));
     115        btnClear.addMouseListener(new MouseAdapter() {
     116            @Override
     117            public void mouseClicked(MouseEvent arg0) {
     118                tfOsmUrl.setText("");
     119            }
     120        });
     121        dlg.add(btnClear, GBC.eol().insets(10,20,0,0));
     122
     123        dlg.add(new JLabel(tr("URL from www.openstreetmap.org (you can paste an URL here to download the area)")), GBC.eol().insets(10,5,5,0));
    114124        dlg.add(tfOsmUrl, GBC.eop().insets(10,0,5,0).fill());
    115125        tfOsmUrl.addMouseListener(
    116126                new MouseAdapter() {