Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/actions/AutoScaleAction.java

    r17 r30  
    44import java.awt.event.KeyEvent;
    55
    6 import javax.swing.AbstractAction;
    7 import javax.swing.JComponent;
    8 import javax.swing.KeyStroke;
    9 
    10 import org.openstreetmap.josm.gui.ImageProvider;
    116import org.openstreetmap.josm.gui.MapFrame;
    127import org.openstreetmap.josm.gui.MapView;
     
    1611 * @author imi
    1712 */
    18 public class AutoScaleAction extends AbstractAction {
     13public class AutoScaleAction extends JosmAction {
    1914        /**
    2015         * The mapView this action operates on.
     
    2318       
    2419        public AutoScaleAction(MapFrame mapFrame) {
    25                 super("Auto Scale", ImageProvider.get("autoscale"));
     20                super("Auto Scale", "autoscale", "Zoom the view to show the whole layer. Disabled if the view is moved.",
     21                                KeyEvent.VK_A, null);
    2622                mapView = mapFrame.mapView;
    27                 putValue(MNEMONIC_KEY, KeyEvent.VK_A);
    28                 putValue(SHORT_DESCRIPTION, "Zoom the view to show the whole layer. Disabled if the view is moved.");
    29                 KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_A, 0);
    30                 putValue(ACCELERATOR_KEY, ks);
    31                 mapFrame.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ks, this);
    32                 mapFrame.getActionMap().put(this, this);
    3323        }
    3424
Note: See TracChangeset for help on using the changeset viewer.