Last change
on this file since 1218 was 1218, checked in by ulfl, 15 years ago |
fix capitalization and other minor menu titles stuff
|
File size:
834 bytes
|
Rev | Line | |
---|
[770] | 1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
| 2 | package org.openstreetmap.josm.actions;
|
---|
| 3 |
|
---|
| 4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
| 5 |
|
---|
| 6 | import java.awt.event.ActionEvent;
|
---|
| 7 | import java.awt.event.KeyEvent;
|
---|
| 8 |
|
---|
| 9 | import org.openstreetmap.josm.Main;
|
---|
[1084] | 10 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
[770] | 11 |
|
---|
| 12 | public final class ZoomInAction extends JosmAction {
|
---|
| 13 |
|
---|
[1169] | 14 | public ZoomInAction() {
|
---|
[1218] | 15 | super(tr("Zoom In"), "dialogs/zoomin", tr("Zoom In"),
|
---|
| 16 | Shortcut.registerShortcut("view:zoomin", tr("View: {0}", tr("Zoom In")), KeyEvent.VK_PLUS, Shortcut.GROUP_DIRECT), true);
|
---|
[1169] | 17 | setEnabled(true);
|
---|
| 18 | }
|
---|
[770] | 19 |
|
---|
[1169] | 20 | public void actionPerformed(ActionEvent e) {
|
---|
[1087] | 21 | if (Main.map == null) return;
|
---|
[1169] | 22 | double zoom = Main.map.mapView.getScale();
|
---|
| 23 | Main.map.mapView.zoomTo(Main.map.mapView.getCenter(), zoom * .9);
|
---|
| 24 | }
|
---|
[770] | 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.