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

Last change on this file since 1728 was 1722, checked in by stoecker, 15 years ago

Large rework in projection handling - now allows only switching and more specific projections
TODO:

  • allow subprojections (i.e. settings for projections)
  • setup preferences for subprojections
  • better support of the new projection depending world bounds (how to handle valid data outside of world)
  • do not allow to zoom out of the world - zoom should stop when whole world is displayed
  • fix Lambert and SwissGrid to handle new OutOfWorld style and subprojections
  • fix new UTM projection
  • handle layers with fixed projection on projection change
  • allow easier projection switching (e.g. in menu)

NOTE:
This checkin very likely will cause problems. Please report or fix them. Older plugins may have trouble. The SVN plugins
have been fixed but may have problems nevertheless. This is a BIG change, but will make JOSMs internal structure much cleaner
and reduce lots of projection related problems.

File size: 763 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 Main.map.mapView.zoomToFactor(1/0.9);
23 }
24}
Note: See TracBrowser for help on using the repository browser.