Last change
on this file since 6426 was 6380, checked in by Don-vip, 10 years ago |
update license/copyright information
|
-
Property svn:eol-style
set to
native
|
File size:
1017 bytes
|
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 |
|
---|
[1169] | 14 | public UnselectAllAction() {
|
---|
| 15 | super(tr("Unselect All"), "unselectall", tr("Unselect all objects."),
|
---|
[4958] | 16 | Shortcut.registerShortcut("edit:unselectall", tr("Edit: {0}",
|
---|
[4982] | 17 | tr("Unselect All")), KeyEvent.VK_ESCAPE, Shortcut.DIRECT), true);
|
---|
[626] | 18 |
|
---|
[2323] | 19 | putValue("help", ht("/Action/UnselectAll"));
|
---|
[1169] | 20 | }
|
---|
[768] | 21 |
|
---|
[6084] | 22 | @Override
|
---|
[1169] | 23 | public void actionPerformed(ActionEvent e) {
|
---|
[1808] | 24 | if (!isEnabled())
|
---|
| 25 | return;
|
---|
[1814] | 26 | getCurrentDataSet().setSelected();
|
---|
[1169] | 27 | }
|
---|
[1808] | 28 | /**
|
---|
| 29 | * Refreshes the enabled state
|
---|
[2512] | 30 | *
|
---|
[1808] | 31 | */
|
---|
[1820] | 32 | @Override
|
---|
| 33 | protected void updateEnabledState() {
|
---|
[1814] | 34 | setEnabled(getEditLayer() != null);
|
---|
[1808] | 35 | }
|
---|
[626] | 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.