source: josm/trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java@ 1180

Last change on this file since 1180 was 1169, checked in by stoecker, 15 years ago

removed usage of tab stops

File size: 841 bytes
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.awt.event.ActionEvent;
7import java.awt.event.KeyEvent;
8
9import org.openstreetmap.josm.Main;
10import org.openstreetmap.josm.tools.Shortcut;
11
12public final class ZoomOutAction extends JosmAction {
13
14 public ZoomOutAction() {
15 super(tr("Zoom out"), "dialogs/zoomout", tr("Zoom out"),
16 Shortcut.registerShortcut("view:zoomout", tr("View: {0}", tr("Zoom out")), KeyEvent.VK_MINUS, Shortcut.GROUP_DIRECT), true);
17 setEnabled(true);
18 }
19
20 public void actionPerformed(ActionEvent e) {
21 if (Main.map == null) return;
22 double zoom = Main.map.mapView.getScale();
23 Main.map.mapView.zoomTo(Main.map.mapView.getCenter(), zoom /.9);
24 }
25}
Note: See TracBrowser for help on using the repository browser.