Last change
on this file since 9676 was 9059, checked in by Don-vip, 8 years ago |
checkstyle
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Rev | Line | |
---|
[6380] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
[626] | 2 | package org.openstreetmap.josm.actions;
|
---|
| 3 |
|
---|
[3252] | 4 | import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
|
---|
[626] | 5 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
| 6 |
|
---|
| 7 | import java.awt.event.ActionEvent;
|
---|
| 8 | import java.awt.event.KeyEvent;
|
---|
[1865] | 9 |
|
---|
[1084] | 10 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
[626] | 11 |
|
---|
[1820] | 12 | public class UnselectAllAction extends JosmAction {
|
---|
[626] | 13 |
|
---|
[9059] | 14 | /**
|
---|
| 15 | * Constructs a new {@code UnselectAllAction}.
|
---|
| 16 | */
|
---|
[1169] | 17 | public UnselectAllAction() {
|
---|
| 18 | super(tr("Unselect All"), "unselectall", tr("Unselect all objects."),
|
---|
[4958] | 19 | Shortcut.registerShortcut("edit:unselectall", tr("Edit: {0}",
|
---|
[4982] | 20 | tr("Unselect All")), KeyEvent.VK_ESCAPE, Shortcut.DIRECT), true);
|
---|
[626] | 21 |
|
---|
[2323] | 22 | putValue("help", ht("/Action/UnselectAll"));
|
---|
[1169] | 23 | }
|
---|
[768] | 24 |
|
---|
[6084] | 25 | @Override
|
---|
[1169] | 26 | public void actionPerformed(ActionEvent e) {
|
---|
[1808] | 27 | if (!isEnabled())
|
---|
| 28 | return;
|
---|
[1814] | 29 | getCurrentDataSet().setSelected();
|
---|
[1169] | 30 | }
|
---|
[9059] | 31 |
|
---|
[1808] | 32 | /**
|
---|
| 33 | * Refreshes the enabled state
|
---|
| 34 | */
|
---|
[1820] | 35 | @Override
|
---|
| 36 | protected void updateEnabledState() {
|
---|
[1814] | 37 | setEnabled(getEditLayer() != null);
|
---|
[1808] | 38 | }
|
---|
[626] | 39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.