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