Last change
on this file since 6509 was 6380, checked in by Don-vip, 11 years ago |
update license/copyright information
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.actions;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 | import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
|
---|
6 |
|
---|
7 | import java.awt.event.ActionEvent;
|
---|
8 | import java.awt.event.KeyEvent;
|
---|
9 |
|
---|
10 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
11 |
|
---|
12 | public class SelectAllAction extends JosmAction {
|
---|
13 |
|
---|
14 | public SelectAllAction() {
|
---|
15 | super(tr("Select All"),"selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."),
|
---|
16 | Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.CTRL), true);
|
---|
17 | putValue("help", ht("/Action/SelectAll"));
|
---|
18 | }
|
---|
19 |
|
---|
20 | @Override
|
---|
21 | public void actionPerformed(ActionEvent e) {
|
---|
22 | if (!isEnabled())
|
---|
23 | return;
|
---|
24 | getCurrentDataSet().setSelected(getCurrentDataSet().allNonDeletedCompletePrimitives());
|
---|
25 | }
|
---|
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.