Changeset 5966 in josm
- Timestamp:
- 2013-05-18T20:15:51+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
r5965 r5966 8 8 import java.awt.event.ActionEvent; 9 9 import java.awt.event.KeyEvent; 10 import java.awt.event.MouseEvent; 11 import java.awt.event.MouseListener; 10 import javax.swing.Icon; 12 11 13 12 import javax.swing.JLabel; … … 21 20 import org.openstreetmap.josm.data.coor.LatLon; 22 21 import org.openstreetmap.josm.gui.MapView; 22 23 23 import org.openstreetmap.josm.tools.GBC; 24 24 import org.openstreetmap.josm.tools.OsmUrlToBounds; … … 31 31 */ 32 32 public JumpToAction() { 33 super(tr("Jump To Position"), null, tr("Opens a dialog that allows to jump to a specific location"), Shortcut.registerShortcut("tools:jumpto", tr("Tool: {0}", tr("Jump To Position")), 34 KeyEvent.VK_J, Shortcut.CTRL), false); 35 putValue("toolbar", "action/jumpto"); 36 Main.toolbar.register(this); 33 super(tr("Jump To Position"), (Icon) null, tr("Opens a dialog that allows to jump to a specific location"), Shortcut.registerShortcut("tools:jumpto", tr("Tool: {0}", tr("Jump To Position")), 34 KeyEvent.VK_J, Shortcut.CTRL), true, "action/jumpto", false); 37 35 } 38 36 … … 169 167 } 170 168 169 @Override 171 170 public void actionPerformed(ActionEvent e) { 172 171 showJumpToDialog(); -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r5965 r5966 79 79 final MapView mv; 80 80 final Collector collector; 81 81 82 82 public class BackgroundProgressMonitor implements ProgressMonitorDialog { 83 83 … … 141 141 final JProgressBar progressBar = new JProgressBar(); 142 142 public final BackgroundProgressMonitor progressMonitor = new BackgroundProgressMonitor(); 143 144 private MouseListener jumpToOnLeftClick; 143 145 144 146 /** … … 701 703 } 702 704 }); 705 706 // also show Jump To dialog on mouse click (except context menu) 707 jumpToOnLeftClick = new MouseAdapter() { 708 @Override 709 public void mouseClicked(MouseEvent e) { 710 if (e.getButton() != MouseEvent.BUTTON3) { 711 Main.main.menu.jumpToAct.showJumpToDialog(); 712 } 713 } 714 }; 703 715 704 716 // Listen for mouse movements and set the position text field … … 740 752 add(distText, GBC.std().insets(3,0,0,0)); 741 753 754 latText.addMouseListener(jumpToOnLeftClick); 755 lonText.addMouseListener(jumpToOnLeftClick); 756 742 757 helpText.setEditable(false); 743 758 add(nameText, GBC.std().insets(3,0,0,0));
Note:
See TracChangeset
for help on using the changeset viewer.