- Timestamp:
- 2016-11-23T23:39:47+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
r11100 r11300 19 19 import org.openstreetmap.josm.data.Bounds; 20 20 import org.openstreetmap.josm.data.coor.LatLon; 21 import org.openstreetmap.josm.gui.ExtendedDialog; 21 22 import org.openstreetmap.josm.gui.MapView; 22 23 import org.openstreetmap.josm.gui.widgets.JosmTextField; 24 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 23 25 import org.openstreetmap.josm.tools.GBC; 24 26 import org.openstreetmap.josm.tools.ImageProvider; … … 112 114 url.getDocument().addDocumentListener(new OsmURLListener()); 113 115 116 SelectAllOnFocusGainedDecorator.decorate(lat); 117 SelectAllOnFocusGainedDecorator.decorate(lon); 118 SelectAllOnFocusGainedDecorator.decorate(zm); 119 SelectAllOnFocusGainedDecorator.decorate(url); 120 114 121 JPanel p = new JPanel(new GridBagLayout()); 115 122 panel.add(p, BorderLayout.NORTH); … … 127 134 p.add(url, GBC.eol().fill(GBC.HORIZONTAL)); 128 135 129 Object[] buttons = {tr("Jump there"), tr("Cancel")};136 String[] buttons = {tr("Jump there"), tr("Cancel")}; 130 137 LatLon ll = null; 131 138 double zoomLvl = 100; 132 139 while (ll == null) { 133 int option = JOptionPane.showOptionDialog( 134 Main.parent, 135 panel, 136 tr("Jump to Position"), 137 JOptionPane.OK_CANCEL_OPTION, 138 JOptionPane.PLAIN_MESSAGE, 139 null, 140 buttons, 141 buttons[0]); 142 143 if (option != JOptionPane.OK_OPTION) return; 140 final int option = new ExtendedDialog(Main.parent, tr("Jump to Position"), buttons) {{ 141 setContent(panel); 142 setCancelButton(2); 143 }}.showDialog().getValue(); 144 145 if (option != 1) return; 144 146 try { 145 147 zoomLvl = Double.parseDouble(zm.getText());
Note:
See TracChangeset
for help on using the changeset viewer.