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

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

removed usage of tab stops

  • Property svn:eol-style set to native
File size: 895 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
12/**
13 * Redoes the last command.
14 *
15 * @author imi
16 */
17public class RedoAction extends JosmAction {
18
19 /**
20 * Construct the action with "Redo" as label.
21 */
22 public RedoAction() {
23 super(tr("Redo"), "redo", tr("Redo the last undone action."),
24 Shortcut.registerShortcut("system:redo", tr("Edit: {0}", tr("Redo")), KeyEvent.VK_Y, Shortcut.GROUP_MENU), true);
25 setEnabled(false);
26 }
27
28 public void actionPerformed(ActionEvent e) {
29 if (Main.map == null)
30 return;
31 Main.map.repaint();
32 Main.main.undoRedo.redo();
33 }
34}
Note: See TracBrowser for help on using the repository browser.