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

Last change on this file since 877 was 877, checked in by stoecker, 16 years ago

added zoom icons

File size: 627 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("Zoom out"), "dialogs/zoomout", 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.