Changes in src/org/openstreetmap/josm/actions/AutoScaleAction.java [17:30] in josm
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/actions/AutoScaleAction.java
r17 r30 4 4 import java.awt.event.KeyEvent; 5 5 6 import javax.swing.AbstractAction;7 import javax.swing.JComponent;8 import javax.swing.KeyStroke;9 10 import org.openstreetmap.josm.gui.ImageProvider;11 6 import org.openstreetmap.josm.gui.MapFrame; 12 7 import org.openstreetmap.josm.gui.MapView; … … 16 11 * @author imi 17 12 */ 18 public class AutoScaleAction extends AbstractAction {13 public class AutoScaleAction extends JosmAction { 19 14 /** 20 15 * The mapView this action operates on. … … 23 18 24 19 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); 26 22 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);33 23 } 34 24
Note:
See TracChangeset
for help on using the changeset viewer.