source: josm/trunk/src/org/openstreetmap/josm/actions/UnselectAllAction.java@ 6050

Last change on this file since 6050 was 5926, checked in by bastiK, 11 years ago

clean up imports

  • Property svn:eol-style set to native
File size: 1017 bytes
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
5import static org.openstreetmap.josm.tools.I18n.tr;
6
7import java.awt.event.ActionEvent;
8import java.awt.event.KeyEvent;
9
10import org.openstreetmap.josm.tools.Shortcut;
11
12public class UnselectAllAction extends JosmAction {
13
14 public UnselectAllAction() {
15 super(tr("Unselect All"), "unselectall", tr("Unselect all objects."),
16 Shortcut.registerShortcut("edit:unselectall", tr("Edit: {0}",
17 tr("Unselect All")), KeyEvent.VK_ESCAPE, Shortcut.DIRECT), true);
18
19 putValue("help", ht("/Action/UnselectAll"));
20 }
21
22 public void actionPerformed(ActionEvent e) {
23 if (!isEnabled())
24 return;
25 getCurrentDataSet().setSelected();
26 }
27 /**
28 * Refreshes the enabled state
29 *
30 */
31 @Override
32 protected void updateEnabledState() {
33 setEnabled(getEditLayer() != null);
34 }
35}
Note: See TracBrowser for help on using the repository browser.