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

Last change on this file since 770 was 770, checked in by framm, 16 years ago
  • forgot to add these, silly me.
File size: 613 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;
10
11public final class ZoomOutAction extends JosmAction {
12
13 public ZoomOutAction() {
14 super(tr("ZoomOut"), null, tr("Zoom out"),
15 KeyEvent.VK_MINUS, 0, true);
16 setEnabled(true);
17 }
18
19 public void actionPerformed(ActionEvent e) {
20 double zoom = Main.map.mapView.getScale();
21 Main.map.mapView.zoomTo(Main.map.mapView.getCenter(), zoom /.9);
22 }
23}
Note: See TracBrowser for help on using the repository browser.