Last change
on this file since 9732 was 8510, checked in by Don-vip, 9 years ago |
checkstyle: enable relevant whitespace checks and fix them
|
-
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 |
|
---|
[8510] | 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;
|
---|
| 9 |
|
---|
[1084] | 10 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
[626] | 11 |
|
---|
[1820] | 12 | public class SelectAllAction extends JosmAction {
|
---|
[626] | 13 |
|
---|
[8510] | 14 | /**
|
---|
| 15 | * Constructs a new {@code SelectAllAction}.
|
---|
| 16 | */
|
---|
[1169] | 17 | public SelectAllAction() {
|
---|
[8510] | 18 | super(tr("Select All"), "selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."),
|
---|
[4982] | 19 | Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.CTRL), true);
|
---|
[2323] | 20 | putValue("help", ht("/Action/SelectAll"));
|
---|
[1169] | 21 | }
|
---|
[626] | 22 |
|
---|
[6084] | 23 | @Override
|
---|
[1169] | 24 | public void actionPerformed(ActionEvent e) {
|
---|
[1808] | 25 | if (!isEnabled())
|
---|
| 26 | return;
|
---|
[1814] | 27 | getCurrentDataSet().setSelected(getCurrentDataSet().allNonDeletedCompletePrimitives());
|
---|
[1169] | 28 | }
|
---|
[1808] | 29 |
|
---|
| 30 | /**
|
---|
| 31 | * Refreshes the enabled state
|
---|
[2512] | 32 | *
|
---|
[1808] | 33 | */
|
---|
[1820] | 34 | @Override
|
---|
| 35 | protected void updateEnabledState() {
|
---|
[1814] | 36 | setEnabled(getEditLayer() != null);
|
---|
[1808] | 37 | }
|
---|
[626] | 38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.